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;
// 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(
contact.remoteConversationRecordKey.toVeilid(),
TransformerCubit(
@ -103,7 +103,7 @@ class ActiveConversationsBlocMapCubit extends BlocMapCubit<TypedKey,
return;
}
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,
}) {
//
_lastInputStateMap = getStateMap(initialInputState);
_lastInputStateMap = IMap();
_updateFollow(initialInputState);
_subscription = stream.listen(_updateFollow);
}