Add Syncing Warning for Groups
continuous-integration/drone/pr Build is passing Details

This commit is contained in:
Sarah Jamie Lewis 2021-06-24 13:38:41 -07:00
parent 0090e86ade
commit 62ef3549b5
8 changed files with 21 additions and 14 deletions

View File

@ -1,6 +1,7 @@
{ {
"@@locale": "de", "@@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.", "groupInviteSettingsWarning": "You have been invited to join a group! Please enable the Group Chat Experiment in Settings to view this Invitation.",
"shutdownCwtchAction": "Shutdown Cwtch", "shutdownCwtchAction": "Shutdown Cwtch",
"shutdownCwtchDialog": "Are you sure you want to shutdown Cwtch? This will close all connections, and exit the application.", "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", "inviteToGroupLabel": "In die Gruppe einladen",
"groupNameLabel": "Gruppenname", "groupNameLabel": "Gruppenname",
"viewServerInfo": "Server Info", "viewServerInfo": "Server Info",
"serverNotSynced": "Out of Sync",
"serverSynced": "Synced", "serverSynced": "Synced",
"serverConnectivityDisconnected": "Server getrennt", "serverConnectivityDisconnected": "Server getrennt",
"serverConnectivityConnected": "Server verbunden", "serverConnectivityConnected": "Server verbunden",

View File

@ -1,6 +1,7 @@
{ {
"@@locale": "en", "@@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.", "groupInviteSettingsWarning": "You have been invited to join a group! Please enable the Group Chat Experiment in Settings to view this Invitation.",
"shutdownCwtchAction": "Shutdown Cwtch", "shutdownCwtchAction": "Shutdown Cwtch",
"shutdownCwtchDialog": "Are you sure you want to shutdown Cwtch? This will close all connections, and exit the application.", "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", "inviteToGroupLabel": "Invite to group",
"groupNameLabel": "Group Name", "groupNameLabel": "Group Name",
"viewServerInfo": "Server Info", "viewServerInfo": "Server Info",
"serverNotSynced": "Out of Sync",
"serverSynced": "Synced", "serverSynced": "Synced",
"serverConnectivityDisconnected": "Server Disconnected", "serverConnectivityDisconnected": "Server Disconnected",
"serverConnectivityConnected": "Server Connected", "serverConnectivityConnected": "Server Connected",

View File

@ -1,6 +1,7 @@
{ {
"@@locale": "es", "@@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.", "groupInviteSettingsWarning": "You have been invited to join a group! Please enable the Group Chat Experiment in Settings to view this Invitation.",
"shutdownCwtchAction": "Shutdown Cwtch", "shutdownCwtchAction": "Shutdown Cwtch",
"shutdownCwtchDialog": "Are you sure you want to shutdown Cwtch? This will close all connections, and exit the application.", "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", "inviteToGroupLabel": "Invitar al grupo",
"groupNameLabel": "Nombre del grupo", "groupNameLabel": "Nombre del grupo",
"viewServerInfo": "Información del servidor", "viewServerInfo": "Información del servidor",
"serverNotSynced": "Fuera de sincronización con el servidor",
"serverSynced": "Sincronizado", "serverSynced": "Sincronizado",
"serverConnectivityDisconnected": "Servidor desconectado", "serverConnectivityDisconnected": "Servidor desconectado",
"serverConnectivityConnected": "Servidor conectado", "serverConnectivityConnected": "Servidor conectado",

View File

@ -1,6 +1,7 @@
{ {
"@@locale": "fr", "@@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.", "groupInviteSettingsWarning": "You have been invited to join a group! Please enable the Group Chat Experiment in Settings to view this Invitation.",
"shutdownCwtchAction": "Shutdown Cwtch", "shutdownCwtchAction": "Shutdown Cwtch",
"shutdownCwtchDialog": "Are you sure you want to shutdown Cwtch? This will close all connections, and exit the application.", "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", "inviteToGroupLabel": "Inviter quelqu'un",
"groupNameLabel": "Nom du groupe", "groupNameLabel": "Nom du groupe",
"viewServerInfo": "Server Info", "viewServerInfo": "Server Info",
"serverNotSynced": "Out of Sync",
"serverSynced": "Synced", "serverSynced": "Synced",
"serverConnectivityDisconnected": "Server Disconnected", "serverConnectivityDisconnected": "Server Disconnected",
"serverConnectivityConnected": "Server Connected", "serverConnectivityConnected": "Server Connected",

View File

@ -1,6 +1,7 @@
{ {
"@@locale": "it", "@@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.", "groupInviteSettingsWarning": "You have been invited to join a group! Please enable the Group Chat Experiment in Settings to view this Invitation.",
"shutdownCwtchAction": "Shutdown Cwtch", "shutdownCwtchAction": "Shutdown Cwtch",
"shutdownCwtchDialog": "Are you sure you want to shutdown Cwtch? This will close all connections, and exit the application.", "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", "inviteToGroupLabel": "Invitare nel gruppo",
"groupNameLabel": "Nome del gruppo", "groupNameLabel": "Nome del gruppo",
"viewServerInfo": "Informazioni sul server", "viewServerInfo": "Informazioni sul server",
"serverNotSynced": "Non sincronizzato",
"serverSynced": "Sincronizzato", "serverSynced": "Sincronizzato",
"serverConnectivityDisconnected": "Server disconnesso", "serverConnectivityDisconnected": "Server disconnesso",
"serverConnectivityConnected": "Server connesso", "serverConnectivityConnected": "Server connesso",

View File

@ -1,6 +1,7 @@
{ {
"@@locale": "pt", "@@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.", "groupInviteSettingsWarning": "You have been invited to join a group! Please enable the Group Chat Experiment in Settings to view this Invitation.",
"shutdownCwtchAction": "Shutdown Cwtch", "shutdownCwtchAction": "Shutdown Cwtch",
"shutdownCwtchDialog": "Are you sure you want to shutdown Cwtch? This will close all connections, and exit the application.", "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", "inviteToGroupLabel": "Convidar ao grupo",
"groupNameLabel": "Nome do Grupo", "groupNameLabel": "Nome do Grupo",
"viewServerInfo": "Server Info", "viewServerInfo": "Server Info",
"serverNotSynced": "Out of Sync",
"serverSynced": "Synced", "serverSynced": "Synced",
"serverConnectivityDisconnected": "Server Disconnected", "serverConnectivityDisconnected": "Server Disconnected",
"serverConnectivityConnected": "Server Connected", "serverConnectivityConnected": "Server Connected",

View File

@ -437,7 +437,8 @@ class ContactInfoState extends ChangeNotifier {
bool isOnline() { bool isOnline() {
if (this.isGroup == true) { 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 { } else {
return this.status == "Authenticated"; return this.status == "Authenticated";
} }

View File

@ -19,6 +19,8 @@ class _MessageListState extends State<MessageList> {
bool showEphemeralWarning = (Provider.of<ContactInfoState>(context).isGroup == false && Provider.of<ContactInfoState>(context).savePeerHistory != "SaveHistory"); bool showEphemeralWarning = (Provider.of<ContactInfoState>(context).isGroup == false && Provider.of<ContactInfoState>(context).savePeerHistory != "SaveHistory");
bool showOfflineWarning = Provider.of<ContactInfoState>(context).isOnline() == false; bool showOfflineWarning = Provider.of<ContactInfoState>(context).isOnline() == false;
bool showMessageWarning = showEphemeralWarning || showOfflineWarning; bool showMessageWarning = showEphemeralWarning || showOfflineWarning;
bool showSyncing = Provider.of<ContactInfoState>(context).isGroup == true && Provider.of<ContactInfoState>(context).status != "Synced";
return RepaintBoundary( return RepaintBoundary(
child: Container( child: Container(
child: Column(children: [ child: Column(children: [
@ -27,7 +29,10 @@ class _MessageListState extends State<MessageList> {
child: Container( child: Container(
padding: EdgeInsets.all(5.0), padding: EdgeInsets.all(5.0),
color: Provider.of<Settings>(context).theme.defaultButtonActiveColor(), 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, ? Text(Provider.of<ContactInfoState>(context).isGroup ? AppLocalizations.of(context)!.serverConnectivityDisconnected : AppLocalizations.of(context)!.peerOfflineMessage,
textAlign: TextAlign.center) textAlign: TextAlign.center)
// Only show the ephemeral status for peer conversations, not for groups... // Only show the ephemeral status for peer conversations, not for groups...
@ -50,6 +55,7 @@ class _MessageListState extends State<MessageList> {
alignment: Alignment.center, alignment: Alignment.center,
image: AssetImage("assets/core/negative_heart_512px.png"), image: AssetImage("assets/core/negative_heart_512px.png"),
colorFilter: ColorFilter.mode(Provider.of<Settings>(context).theme.hilightElementTextColor(), BlendMode.srcIn))), colorFilter: ColorFilter.mode(Provider.of<Settings>(context).theme.hilightElementTextColor(), BlendMode.srcIn))),
// Don't load messages for syncing server...
child: ListView.builder( child: ListView.builder(
controller: ctrlr1, controller: ctrlr1,
itemCount: Provider.of<ContactInfoState>(outerContext).totalMessages, itemCount: Provider.of<ContactInfoState>(outerContext).totalMessages,