fix follow

This commit is contained in:
Christien Rioux 2024-02-28 11:58:46 -05:00
parent 72ffae6a92
commit ad9a77d68f
2 changed files with 4 additions and 3 deletions

View File

@ -46,7 +46,7 @@ class ActiveConversationsBlocMapCubit extends BlocMapCubit<TypedKey,
_contactListCubit = contactListCubit; _contactListCubit = contactListCubit;
// Add an active conversation to be tracked for changes // Add an active conversation to be tracked for changes
Future<void> addConversation({required proto.Contact contact}) async => Future<void> _addConversation({required proto.Contact contact}) async =>
add(() => MapEntry( add(() => MapEntry(
contact.remoteConversationRecordKey.toVeilid(), contact.remoteConversationRecordKey.toVeilid(),
TransformerCubit( TransformerCubit(
@ -103,7 +103,7 @@ class ActiveConversationsBlocMapCubit extends BlocMapCubit<TypedKey,
return; return;
} }
final contact = contactList[contactIndex]; final contact = contactList[contactIndex];
await addConversation(contact: contact); await _addConversation(contact: contact);
} }
//// ////

View File

@ -18,7 +18,8 @@ abstract mixin class StateFollower<S extends Object, K, V> {
required Stream<S> stream, required Stream<S> stream,
}) { }) {
// //
_lastInputStateMap = getStateMap(initialInputState); _lastInputStateMap = IMap();
_updateFollow(initialInputState);
_subscription = stream.listen(_updateFollow); _subscription = stream.listen(_updateFollow);
} }