Merge pull request 'Add Syncing Warning for Groups' (#217) from launch into trunk
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
Reviewed-on: #217
This commit is contained in:
commit
6eccece360
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
"@@locale": "de",
|
||||
"@@last_modified": "2021-06-24T18:24:27+02:00",
|
||||
"@@last_modified": "2021-06-24T22:33:44+02:00",
|
||||
"serverNotSynced": "Syncing New Messages (This can take some time)...",
|
||||
"groupInviteSettingsWarning": "You have been invited to join a group! Please enable the Group Chat Experiment in Settings to view this Invitation.",
|
||||
"shutdownCwtchAction": "Shutdown Cwtch",
|
||||
"shutdownCwtchDialog": "Are you sure you want to shutdown Cwtch? This will close all connections, and exit the application.",
|
||||
|
@ -155,7 +156,6 @@
|
|||
"inviteToGroupLabel": "In die Gruppe einladen",
|
||||
"groupNameLabel": "Gruppenname",
|
||||
"viewServerInfo": "Server Info",
|
||||
"serverNotSynced": "Out of Sync",
|
||||
"serverSynced": "Synced",
|
||||
"serverConnectivityDisconnected": "Server getrennt",
|
||||
"serverConnectivityConnected": "Server verbunden",
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
"@@locale": "en",
|
||||
"@@last_modified": "2021-06-24T18:24:27+02:00",
|
||||
"@@last_modified": "2021-06-24T22:33:44+02:00",
|
||||
"serverNotSynced": "Syncing New Messages (This can take some time)...",
|
||||
"groupInviteSettingsWarning": "You have been invited to join a group! Please enable the Group Chat Experiment in Settings to view this Invitation.",
|
||||
"shutdownCwtchAction": "Shutdown Cwtch",
|
||||
"shutdownCwtchDialog": "Are you sure you want to shutdown Cwtch? This will close all connections, and exit the application.",
|
||||
|
@ -155,7 +156,6 @@
|
|||
"inviteToGroupLabel": "Invite to group",
|
||||
"groupNameLabel": "Group Name",
|
||||
"viewServerInfo": "Server Info",
|
||||
"serverNotSynced": "Out of Sync",
|
||||
"serverSynced": "Synced",
|
||||
"serverConnectivityDisconnected": "Server Disconnected",
|
||||
"serverConnectivityConnected": "Server Connected",
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
"@@locale": "es",
|
||||
"@@last_modified": "2021-06-24T18:24:27+02:00",
|
||||
"@@last_modified": "2021-06-24T22:33:44+02:00",
|
||||
"serverNotSynced": "Fuera de sincronización con el servidor",
|
||||
"groupInviteSettingsWarning": "You have been invited to join a group! Please enable the Group Chat Experiment in Settings to view this Invitation.",
|
||||
"shutdownCwtchAction": "Shutdown Cwtch",
|
||||
"shutdownCwtchDialog": "Are you sure you want to shutdown Cwtch? This will close all connections, and exit the application.",
|
||||
|
@ -155,7 +156,6 @@
|
|||
"inviteToGroupLabel": "Invitar al grupo",
|
||||
"groupNameLabel": "Nombre del grupo",
|
||||
"viewServerInfo": "Información del servidor",
|
||||
"serverNotSynced": "Fuera de sincronización con el servidor",
|
||||
"serverSynced": "Sincronizado",
|
||||
"serverConnectivityDisconnected": "Servidor desconectado",
|
||||
"serverConnectivityConnected": "Servidor conectado",
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
"@@locale": "fr",
|
||||
"@@last_modified": "2021-06-24T18:24:27+02:00",
|
||||
"@@last_modified": "2021-06-24T22:33:44+02:00",
|
||||
"serverNotSynced": "Syncing New Messages (This can take some time)...",
|
||||
"groupInviteSettingsWarning": "You have been invited to join a group! Please enable the Group Chat Experiment in Settings to view this Invitation.",
|
||||
"shutdownCwtchAction": "Shutdown Cwtch",
|
||||
"shutdownCwtchDialog": "Are you sure you want to shutdown Cwtch? This will close all connections, and exit the application.",
|
||||
|
@ -155,7 +156,6 @@
|
|||
"inviteToGroupLabel": "Inviter quelqu'un",
|
||||
"groupNameLabel": "Nom du groupe",
|
||||
"viewServerInfo": "Server Info",
|
||||
"serverNotSynced": "Out of Sync",
|
||||
"serverSynced": "Synced",
|
||||
"serverConnectivityDisconnected": "Server Disconnected",
|
||||
"serverConnectivityConnected": "Server Connected",
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
"@@locale": "it",
|
||||
"@@last_modified": "2021-06-24T18:24:27+02:00",
|
||||
"@@last_modified": "2021-06-24T22:33:44+02:00",
|
||||
"serverNotSynced": "Non sincronizzato",
|
||||
"groupInviteSettingsWarning": "You have been invited to join a group! Please enable the Group Chat Experiment in Settings to view this Invitation.",
|
||||
"shutdownCwtchAction": "Shutdown Cwtch",
|
||||
"shutdownCwtchDialog": "Are you sure you want to shutdown Cwtch? This will close all connections, and exit the application.",
|
||||
|
@ -155,7 +156,6 @@
|
|||
"inviteToGroupLabel": "Invitare nel gruppo",
|
||||
"groupNameLabel": "Nome del gruppo",
|
||||
"viewServerInfo": "Informazioni sul server",
|
||||
"serverNotSynced": "Non sincronizzato",
|
||||
"serverSynced": "Sincronizzato",
|
||||
"serverConnectivityDisconnected": "Server disconnesso",
|
||||
"serverConnectivityConnected": "Server connesso",
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
"@@locale": "pt",
|
||||
"@@last_modified": "2021-06-24T18:24:27+02:00",
|
||||
"@@last_modified": "2021-06-24T22:33:44+02:00",
|
||||
"serverNotSynced": "Syncing New Messages (This can take some time)...",
|
||||
"groupInviteSettingsWarning": "You have been invited to join a group! Please enable the Group Chat Experiment in Settings to view this Invitation.",
|
||||
"shutdownCwtchAction": "Shutdown Cwtch",
|
||||
"shutdownCwtchDialog": "Are you sure you want to shutdown Cwtch? This will close all connections, and exit the application.",
|
||||
|
@ -155,7 +156,6 @@
|
|||
"inviteToGroupLabel": "Convidar ao grupo",
|
||||
"groupNameLabel": "Nome do Grupo",
|
||||
"viewServerInfo": "Server Info",
|
||||
"serverNotSynced": "Out of Sync",
|
||||
"serverSynced": "Synced",
|
||||
"serverConnectivityDisconnected": "Server Disconnected",
|
||||
"serverConnectivityConnected": "Server Connected",
|
||||
|
|
|
@ -437,7 +437,8 @@ class ContactInfoState extends ChangeNotifier {
|
|||
|
||||
bool isOnline() {
|
||||
if (this.isGroup == true) {
|
||||
return this.status == "Synced";
|
||||
// We now have an out of sync warning so we will mark these as online...
|
||||
return this.status == "Authenticated" || this.status == "Synced";
|
||||
} else {
|
||||
return this.status == "Authenticated";
|
||||
}
|
||||
|
|
|
@ -19,6 +19,8 @@ class _MessageListState extends State<MessageList> {
|
|||
bool showEphemeralWarning = (Provider.of<ContactInfoState>(context).isGroup == false && Provider.of<ContactInfoState>(context).savePeerHistory != "SaveHistory");
|
||||
bool showOfflineWarning = Provider.of<ContactInfoState>(context).isOnline() == false;
|
||||
bool showMessageWarning = showEphemeralWarning || showOfflineWarning;
|
||||
bool showSyncing = Provider.of<ContactInfoState>(context).isGroup == true && Provider.of<ContactInfoState>(context).status != "Synced";
|
||||
|
||||
return RepaintBoundary(
|
||||
child: Container(
|
||||
child: Column(children: [
|
||||
|
@ -27,7 +29,10 @@ class _MessageListState extends State<MessageList> {
|
|||
child: Container(
|
||||
padding: EdgeInsets.all(5.0),
|
||||
color: Provider.of<Settings>(context).theme.defaultButtonActiveColor(),
|
||||
child: showOfflineWarning
|
||||
child: showSyncing ?
|
||||
Text(AppLocalizations.of(context)!.serverNotSynced,
|
||||
textAlign: TextAlign.center)
|
||||
: showOfflineWarning
|
||||
? Text(Provider.of<ContactInfoState>(context).isGroup ? AppLocalizations.of(context)!.serverConnectivityDisconnected : AppLocalizations.of(context)!.peerOfflineMessage,
|
||||
textAlign: TextAlign.center)
|
||||
// Only show the ephemeral status for peer conversations, not for groups...
|
||||
|
@ -50,6 +55,7 @@ class _MessageListState extends State<MessageList> {
|
|||
alignment: Alignment.center,
|
||||
image: AssetImage("assets/core/negative_heart_512px.png"),
|
||||
colorFilter: ColorFilter.mode(Provider.of<Settings>(context).theme.hilightElementTextColor(), BlendMode.srcIn))),
|
||||
// Don't load messages for syncing server...
|
||||
child: ListView.builder(
|
||||
controller: ctrlr1,
|
||||
itemCount: Provider.of<ContactInfoState>(outerContext).totalMessages,
|
||||
|
|
Loading…
Reference in New Issue