mirror of
https://gitlab.com/veilid/veilidchat.git
synced 2025-08-19 03:07:50 -04:00
refactor and cleanup in prep for profile changing
This commit is contained in:
parent
87bb1657c7
commit
56d65442f4
49 changed files with 967 additions and 655 deletions
|
@ -1,13 +1,19 @@
|
|||
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);
|
||||
ActiveChatCubit(super.initialState, {required RouterCubit routerCubit})
|
||||
: _routerCubit = routerCubit;
|
||||
|
||||
void setActiveChat(TypedKey? activeChatLocalConversationRecordKey) {
|
||||
emit(activeChatLocalConversationRecordKey);
|
||||
_routerCubit.setHasActiveChat(activeChatLocalConversationRecordKey != null);
|
||||
}
|
||||
|
||||
final RouterCubit _routerCubit;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue