checkpoint

This commit is contained in:
Christien Rioux 2024-02-12 09:10:07 -05:00
parent a6ba08255b
commit 9dd17cb077
11 changed files with 80 additions and 85 deletions

View file

@ -91,14 +91,17 @@ class ActiveConversationMessagesCubit extends BlocMapCubit<TypedKey,
required proto.Conversation localConversation,
required proto.Conversation remoteConversation}) async =>
add(() => MapEntry(
proto.TypedKeyProto.fromProto(contact.remoteConversationRecordKey),
contact.remoteConversationRecordKey.toVeilid(),
MessagesCubit(
activeAccountInfo: _activeAccountInfo,
remoteIdentityPublicKey: contact.identityPublicKey,
localConversationRecordKey: contact.localConversationRecordKey,
remoteConversationRecordKey: contact.remoteConversationRecordKey,
localMessagesRecordKey: localConversation.messages,
remoteMessagesRecordKey: remoteConversation.messages)));
remoteIdentityPublicKey: contact.identityPublicKey.toVeilid(),
localConversationRecordKey:
contact.localConversationRecordKey.toVeilid(),
remoteConversationRecordKey:
contact.remoteConversationRecordKey.toVeilid(),
localMessagesRecordKey: localConversation.messages.toVeilid(),
remoteMessagesRecordKey:
remoteConversation.messages.toVeilid())));
////

View file

@ -23,8 +23,7 @@ class ChatListCubit extends DHTShortArrayCubit<proto.Chat> {
final accountRecordKey =
activeAccountInfo.userLogin.accountRecordInfo.accountRecord.recordKey;
final chatListRecordKey =
proto.OwnedDHTRecordPointerProto.fromProto(account.chatList);
final chatListRecordKey = account.chatList.toVeilid();
final dhtRecord = await DHTShortArray.openOwned(chatListRecordKey,
parent: accountRecordKey);

View file

@ -26,7 +26,7 @@ class ChatSingleContactItemWidget extends StatelessWidget {
final activeChatCubit = context.watch<ActiveChatCubit>();
final remoteConversationRecordKey =
proto.TypedKeyProto.fromProto(_contact.remoteConversationRecordKey);
_contact.remoteConversationRecordKey.toVeilid();
final selected = activeChatCubit.state == remoteConversationRecordKey;
return Container(