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

Commit

Permalink
Ensure History and Bookmark labels are shown in url bar when they are…
Browse files Browse the repository at this point in the history
… visible. Fixes #1818
  • Loading branch information
bluemarvin committed Sep 17, 2019
1 parent 0e644da commit b29d0cd
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -403,13 +403,14 @@ public void attachToWindow(@NonNull WindowWidget aWindow) {
mAttachedWindow.addHistoryViewListener(this);

if (mAttachedWindow != null) {
mURLBar.setIsContentMode(mAttachedWindow.isBookmarksVisible());
mURLBar.setIsContentMode(mAttachedWindow.isBookmarksVisible() || mAttachedWindow.isHistoryVisible());
mURLBar.setURL("");
if (mAttachedWindow.isBookmarksVisible()) {
mURLBar.setURL(getResources().getString(R.string.url_bookmarks_title));
mURLBar.setHint(R.string.url_bookmarks_title);
mURLBar.setInsecureVisibility(View.GONE);

} if (mAttachedWindow.isHistoryVisible()) {
mURLBar.setURL(getResources().getString(R.string.url_history_title));
} else if (mAttachedWindow.isHistoryVisible()) {
mURLBar.setHint(R.string.url_history_title);
mURLBar.setInsecureVisibility(View.GONE);

} else {
Expand Down Expand Up @@ -713,7 +714,7 @@ public void release() {

@Override
public void onLocationChange(GeckoSession session, String url) {
if (mURLBar != null && !mAttachedWindow.isBookmarksVisible()) {
if (mURLBar != null && !mAttachedWindow.isBookmarksVisible() && !mAttachedWindow.isHistoryVisible()) {
Log.d(LOGTAG, "Got location change");
mURLBar.setURL(url);
mURLBar.setHint(R.string.search_placeholder);
Expand Down

0 comments on commit b29d0cd

Please sign in to comment.