Skip to content

Commit

Permalink
[Jetchat] Fix for the drawer failing to open after double-clicking on…
Browse files Browse the repository at this point in the history
… the drawer icon.
  • Loading branch information
alajemba-vik authored and Victoria Awesome Alaje committed Jun 14, 2022
1 parent 5f70d48 commit 06301be
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,12 @@ class NavActivity : AppCompatActivity() {
if (drawerOpen) {
// Open drawer and reset state in VM.
LaunchedEffect(Unit) {
drawerState.open()
viewModel.resetOpenDrawerAction()
//wrap in try-finally to handle interruption whiles opening drawer
try {
drawerState.open()
} finally {
viewModel.resetOpenDrawerAction()
}
}
}

Expand Down

0 comments on commit 06301be

Please sign in to comment.