Skip to content

Commit

Permalink
fix: Added fix for end room with bottom sheet (#1803)
Browse files Browse the repository at this point in the history
* Added fix for end room with bottom sheet

* 🤖 Automated Format and Fix

---------

Co-authored-by: Decoder07 <[email protected]>
  • Loading branch information
Decoder07 and Decoder07 authored Jul 24, 2024
1 parent 54b9bee commit 929c080
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/hms_room_kit/lib/src/meeting/meeting_store.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1433,6 +1433,7 @@ class MeetingStore extends ChangeNotifier

void clearRoomState() async {
// clearPIPState();
removeAllBottomSheets();
removeListeners();
toggleAlwaysScreenOn();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,18 @@ class ChatOnlyBottomSheet extends StatefulWidget {
}

class _ChatOnlyBottomSheetState extends State<ChatOnlyBottomSheet> {
@override
void initState() {
super.initState();
context.read<MeetingStore>().addBottomSheet(context);
}

@override
void deactivate() {
context.read<MeetingStore>().removeBottomSheet(context);
super.deactivate();
}

@override
Widget build(BuildContext context) {
return SafeArea(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ class _ChatParticipantsTabBarState extends State<ChatParticipantsTabBar>
@override
void initState() {
super.initState();
context.read<MeetingStore>().addBottomSheet(context);
_controller =
TabController(length: 2, vsync: this, initialIndex: widget.tabIndex);

Expand All @@ -40,6 +41,12 @@ class _ChatParticipantsTabBarState extends State<ChatParticipantsTabBar>
});
}

@override
void deactivate() {
context.read<MeetingStore>().removeBottomSheet(context);
super.deactivate();
}

@override
Widget build(BuildContext context) {
return SafeArea(
Expand Down

0 comments on commit 929c080

Please sign in to comment.