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

Commit

Permalink
Use the FxR canGoBack() logic instead of the GeckoSession.canGoBack()…
Browse files Browse the repository at this point in the history
… logic when dispatching onCanGoBack event (#2387)
  • Loading branch information
MortimerGoro authored and keianhzo committed Nov 27, 2019
1 parent e862905 commit d6f46c4
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ private void dumpAllState() {

private void dumpState(GeckoSession.NavigationDelegate aListener) {
if (mState.mSession != null) {
aListener.onCanGoBack(mState.mSession, mState.mCanGoBack);
aListener.onCanGoBack(mState.mSession, canGoBack());
aListener.onCanGoForward(mState.mSession, mState.mCanGoForward);
aListener.onLocationChange(mState.mSession, mState.mUri);
}
Expand Down Expand Up @@ -840,15 +840,15 @@ public void onLocationChange(@NonNull GeckoSession aSession, String aUri) {
}

@Override
public void onCanGoBack(@NonNull GeckoSession aSession, boolean aCanGoBack) {
public void onCanGoBack(@NonNull GeckoSession aSession, boolean aGeckoSessionCanGoBack) {
if (mState.mSession != aSession) {
return;
}
Log.d(LOGTAG, "Session onCanGoBack: " + (aCanGoBack ? "true" : "false"));
mState.mCanGoBack = aCanGoBack;
Log.d(LOGTAG, "Session onCanGoBack: " + (aGeckoSessionCanGoBack ? "true" : "false"));
mState.mCanGoBack = aGeckoSessionCanGoBack;

for (GeckoSession.NavigationDelegate listener : mNavigationListeners) {
listener.onCanGoBack(aSession, aCanGoBack);
listener.onCanGoBack(aSession, canGoBack());
}
}

Expand Down

0 comments on commit d6f46c4

Please sign in to comment.