Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

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 authored Feb 21, 2020

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 513cade commit 18aba8b
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 18aba8b

Please sign in to comment.