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

Commit

Permalink
Only use loadUri when switching to desktop mode if the URL changes. (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
bluemarvin authored Mar 16, 2020
1 parent 2516a84 commit 9cfba1f
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -821,8 +821,11 @@ public void setUaMode(int mode) {
mState.mSettings.setViewportMode(GeckoSessionSettings.VIEWPORT_MODE_MOBILE);
}
mState.mSession.getSettings().setViewportMode(mState.mSettings.getViewportMode());
// FIXME The GeckoSession.LOAD_FLAGS_REPLACE_HISTORY flag fails due to https://bugzilla.mozilla.org/show_bug.cgi?id=1618664
mState.mSession.loadUri(overrideUri != null ? overrideUri : mState.mUri, GeckoSession.LOAD_FLAGS_BYPASS_CACHE); // | GeckoSession.LOAD_FLAGS_REPLACE_HISTORY);
if (overrideUri != null) {
mState.mSession.loadUri(overrideUri, GeckoSession.LOAD_FLAGS_BYPASS_CACHE | GeckoSession.LOAD_FLAGS_REPLACE_HISTORY);
} else {
mState.mSession.reload(GeckoSession.LOAD_FLAGS_BYPASS_CACHE);
}
}


Expand Down

0 comments on commit 9cfba1f

Please sign in to comment.