From 91c556dd14be67956ff9ec9142fcc8dbc67a3d5a Mon Sep 17 00:00:00 2001 From: Sarah Jamie Lewis Date: Thu, 15 Jul 2021 10:57:17 -0700 Subject: [PATCH] Fixup Group Invite Accept Timestamp + Syncing Indicator --- lib/cwtch/cwtchNotifier.dart | 6 +++--- lib/widgets/contactrow.dart | 5 +++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/lib/cwtch/cwtchNotifier.dart b/lib/cwtch/cwtchNotifier.dart index acd1a35b..b079c73e 100644 --- a/lib/cwtch/cwtchNotifier.dart +++ b/lib/cwtch/cwtchNotifier.dart @@ -262,8 +262,8 @@ class CwtchNotifier { server: groupInvite["ServerHost"], status: status, isGroup: true, - lastMessageTime: DateTime.now())); - profileCN.getProfile(data["ProfileOnion"])?.contactList.updateLastMessageTime(groupInvite["GroupID"], DateTime.now()); + lastMessageTime: DateTime.fromMillisecondsSinceEpoch(0))); + profileCN.getProfile(data["ProfileOnion"])?.contactList.updateLastMessageTime(groupInvite["GroupID"], DateTime.fromMillisecondsSinceEpoch(0)); } } break; @@ -271,7 +271,7 @@ class CwtchNotifier { EnvironmentConfig.debugLog("accept group invite"); profileCN.getProfile(data["ProfileOnion"])?.contactList.getContact(data["GroupID"])!.authorization = ContactAuthorization.approved; - profileCN.getProfile(data["ProfileOnion"])?.contactList.updateLastMessageTime(data["GroupID"], DateTime.now()); + profileCN.getProfile(data["ProfileOnion"])?.contactList.updateLastMessageTime(data["GroupID"], DateTime.fromMillisecondsSinceEpoch(0)); break; case "ServerStateChange": // Update the Server Cache diff --git a/lib/widgets/contactrow.dart b/lib/widgets/contactrow.dart index 0b607a14..18c750dc 100644 --- a/lib/widgets/contactrow.dart +++ b/lib/widgets/contactrow.dart @@ -58,6 +58,11 @@ class _ContactRowState extends State { softWrap: true, overflow: TextOverflow.visible, ), + Visibility( + visible: contact.isGroup && contact.status == "Authenticated", + child: LinearProgressIndicator( + color: Provider.of(context).theme.defaultButtonActiveColor(), + )), Text(contact.onion, style: TextStyle(color: contact.isBlocked ? Provider.of(context).theme.portraitBlockedTextColor() : Provider.of(context).theme.mainTextColor())), ],