File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ import 'package:whitenoise/utils/pubkey_formatter.dart';
2525class ChatNotifier extends Notifier <ChatState > {
2626 final _logger = Logger ('ChatNotifier' );
2727 final _messageSenderService = MessageSenderService ();
28-
28+
2929 final Map <String , Future <DMChatData ?>> _dmChatDataLoadingFutures = {};
3030
3131 @override
@@ -820,7 +820,7 @@ class ChatNotifier extends Notifier<ChatState> {
820820 Future <DMChatData ?> _loadDMChatData (String groupId) async {
821821 const maxRetries = 2 ;
822822 int attempt = 0 ;
823-
823+
824824 while (attempt <= maxRetries) {
825825 try {
826826 final otherMember = ref.read (groupsProvider.notifier).getOtherGroupMember (groupId);
@@ -849,15 +849,19 @@ class ChatNotifier extends Notifier<ChatState> {
849849 } catch (e) {
850850 attempt++ ;
851851 if (attempt <= maxRetries) {
852- _logger.warning ('Error in _loadDMChatData for group $groupId (attempt $attempt /$maxRetries ): $e ' );
852+ _logger.warning (
853+ 'Error in _loadDMChatData for group $groupId (attempt $attempt /$maxRetries ): $e ' ,
854+ );
853855 await Future .delayed (Duration (milliseconds: 500 * attempt));
854856 } else {
855- _logger.severe ('Failed to load DMChatData for group $groupId after $maxRetries retries: $e ' );
857+ _logger.severe (
858+ 'Failed to load DMChatData for group $groupId after $maxRetries retries: $e ' ,
859+ );
856860 return null ;
857861 }
858862 }
859863 }
860-
864+
861865 return null ;
862866 }
863867}
You can’t perform that action at this time.
0 commit comments