Skip to content

Commit

Permalink
Remove notifications when resizing and opening library panels (Mozill…
Browse files Browse the repository at this point in the history
  • Loading branch information
keianhzo authored and Alexandre Lissy committed Jan 21, 2020
1 parent fa287e1 commit 9c37fc0
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ protected void initializeWidgets() {
public void onFocusedWindowChanged(@NonNull WindowWidget aFocusedWindow, @Nullable WindowWidget aPrevFocusedWindow) {
attachToWindow(aFocusedWindow, aPrevFocusedWindow);
mTray.setAddWindowVisible(mWindows.canOpenNewWindow());
mNavigationBar.hidePopUpsBlockedNotification();
mNavigationBar.hideNotifications();
}
@Override
public void onWindowBorderChanged(@NonNull WindowWidget aChangeWindow) {
Expand All @@ -295,14 +295,14 @@ public void onWindowBorderChanged(@NonNull WindowWidget aChangeWindow) {

@Override
public void onWindowsMoved() {
mNavigationBar.hidePopUpsBlockedNotification();
mNavigationBar.hideNotifications();
updateWidget(mTray);
}

@Override
public void onWindowClosed() {
mTray.setAddWindowVisible(mWindows.canOpenNewWindow());
mNavigationBar.hidePopUpsBlockedNotification();
mNavigationBar.hideNotifications();
updateWidget(mTray);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -609,6 +609,8 @@ private void enterResizeMode() {
}
}

hideNotifications();

// Update preset styles
}

Expand Down Expand Up @@ -1051,6 +1053,8 @@ public void onBookmarksShown(WindowWidget aWindow) {
mURLBar.setHint(R.string.url_bookmarks_title);
mURLBar.setIsLibraryVisible(true);
}

hideNotifications();
}

@Override
Expand All @@ -1071,6 +1075,8 @@ public void onHistoryViewShown(WindowWidget aWindow) {
mURLBar.setHint(R.string.url_history_title);
mURLBar.setIsLibraryVisible(true);
}

hideNotifications();
}

@Override
Expand Down Expand Up @@ -1226,6 +1232,10 @@ public void hidePopUpsBlockedNotification() {
});
}

public void hideNotifications() {
hidePopUpsBlockedNotification();
}

private void showNotification(UIButton button, int stringRes) {
if (mPopUpNotification != null && mPopUpNotification.isVisible()) {
return;
Expand Down

0 comments on commit 9c37fc0

Please sign in to comment.