This commit is contained in:
Christien Rioux 2024-06-16 22:12:24 -04:00
parent 2ccad50f9a
commit 360ba436f8
29 changed files with 501 additions and 317 deletions

View file

@ -1,19 +1,13 @@
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:veilid_support/veilid_support.dart';
import '../../router/router.dart';
// XXX: if we ever want to have more than one chat 'open', we should put the
// operations and state for that here.
class ActiveChatCubit extends Cubit<TypedKey?> {
ActiveChatCubit(super.initialState, {required RouterCubit routerCubit})
: _routerCubit = routerCubit;
ActiveChatCubit(super.initialState);
void setActiveChat(TypedKey? activeChatLocalConversationRecordKey) {
emit(activeChatLocalConversationRecordKey);
_routerCubit.setHasActiveChat(activeChatLocalConversationRecordKey != null);
}
final RouterCubit _routerCubit;
}