Skip to content

Commit

Permalink
Hide top bar when not in private mode and is single window (#2736)
Browse files Browse the repository at this point in the history
  • Loading branch information
keianhzo committed Feb 5, 2020
1 parent 5f3b52e commit 6aeaf88
Showing 1 changed file with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -163,14 +163,16 @@ public WindowViewModel(Application application) {
private Observer<ObservableBoolean> mIsTopBarVisibleObserver = new Observer<ObservableBoolean>() {
@Override
public void onChanged(ObservableBoolean o) {
if (isFullscreen.getValue().get() || isResizeMode.getValue().get()) {
if (isFullscreen.getValue().get() || isResizeMode.getValue().get() || !isWindowVisible.getValue().get()) {
isTopBarVisible.setValue(new ObservableBoolean(false));

} else if (isPrivateSession.getValue().get() && isOnlyWindow.getValue().get()) {
isTopBarVisible.setValue(new ObservableBoolean(true));

} else {
isTopBarVisible.setValue(new ObservableBoolean(isWindowVisible.getValue().get() && !isOnlyWindow.getValue().get()));
if (isOnlyWindow.getValue().get()) {
isTopBarVisible.setValue(new ObservableBoolean(isPrivateSession.getValue().get()));

} else {
isTopBarVisible.setValue(new ObservableBoolean(true));
}
}
}
};
Expand Down

0 comments on commit 6aeaf88

Please sign in to comment.