Skip to content

Commit

Permalink
Remove the back handler for non focused views (#2802)
Browse files Browse the repository at this point in the history
  • Loading branch information
keianhzo committed Feb 21, 2020
1 parent 513cade commit 18aba8b
Showing 1 changed file with 10 additions and 0 deletions.
Expand Up @@ -639,6 +639,16 @@ public void setActiveWindow(boolean active) {
updateBorder();

mViewModel.setIsActiveWindow(active);

// Remove tha back handler in case there is a library view visible, otherwise it gets dismissed
// when back is clicked even if other window is focused.
if (mView != null) {
if (active) {
mWidgetManager.pushBackHandler(mBackHandler);
} else {
mWidgetManager.popBackHandler(mBackHandler);
}
}
}

@Nullable
Expand Down

0 comments on commit 18aba8b

Please sign in to comment.