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

Dismiss library panels explicitly #2353

Merged
merged 1 commit into from
Nov 22, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ default void onFxALogin(@NonNull View view) {}
default void onFxASynSettings(@NonNull View view) {}
default void onShowContextMenu(@NonNull View view, Bookmark item, boolean isLastVisibleItem) {}
default void onHideContextMenu(@NonNull View view) {}
default void onItemClicked(@NonNull View view, Bookmark item) {}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ default void onFxALogin(@NonNull View view) {}
default void onFxASynSettings(@NonNull View view) {}
default void onShowContextMenu(@NonNull View view, @NonNull VisitInfo item, boolean isLastVisibleItem) {}
default void onHideContextMenu(@NonNull View view) {}
default void onItemClicked(@NonNull View view, VisitInfo item) {}
}
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,8 @@ public void onClick(@NonNull View view, @NonNull Bookmark item) {

Session session = SessionStore.get().getActiveSession();
session.loadUri(item.getUrl());

mBookmarksViewListeners.forEach((listener) -> listener.onItemClicked(view, item));
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,8 @@ public void onClick(View view, VisitInfo item) {

Session session = SessionStore.get().getActiveSession();
session.loadUri(item.getUrl());

mHistoryViewListeners.forEach((listener) -> listener.onItemClicked(view, item));
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1420,6 +1420,11 @@ public void onFxASynSettings(@NonNull View view) {
public void onHideContextMenu(@NonNull View view) {
hideContextMenus();
}

@Override
public void onItemClicked(@NonNull View view, Bookmark item) {
hideBookmarks();
}
};

private HistoryCallback mHistoryListener = new HistoryCallback() {
Expand Down Expand Up @@ -1449,6 +1454,11 @@ public void onFxASynSettings(@NonNull View view) {
public void onHideContextMenu(@NonNull View view) {
hideContextMenus();
}

@Override
public void onItemClicked(@NonNull View view, VisitInfo item) {
hideHistory();
}
};

private void hideContextMenus() {
Expand Down Expand Up @@ -1546,14 +1556,6 @@ public void onVideoAvailabilityChanged(boolean aVideosAvailable) {
@Override
public void onPageStart(@NonNull GeckoSession geckoSession, @NonNull String s) {
mCaptureOnPageStop = true;

if (isHistoryVisible()) {
hideHistory();
}

if (isBookmarksVisible()) {
hideBookmarks();
}
}

@Override
Expand Down