fix eventual consistency

This commit is contained in:
Christien Rioux 2024-06-09 14:43:28 -04:00
parent 2c3d4dce93
commit b5612e5dd8
23 changed files with 309 additions and 296 deletions

View file

@ -84,10 +84,7 @@ class ChatListCubit extends DHTShortArrayCubit<proto.Chat>
..remoteConversationRecordKey = remoteConversationRecordKey.toProto();
// Add chat
final added = await writer.tryAdd(chat.writeToBuffer());
if (!added) {
throw Exception('Failed to add chat');
}
await writer.add(chat.writeToBuffer());
});
}