mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 846772 - Observe dynamic toolbar pref on Android. r=kats
Respond to this pref changing instantly instead of requiring a restart.
This commit is contained in:
parent
c908455874
commit
34f36a04cf
@ -458,7 +458,7 @@ abstract public class BrowserApp extends GeckoApp
|
||||
}
|
||||
}
|
||||
|
||||
// Load the dynamic toolbar pref
|
||||
// Listen to the dynamic toolbar pref
|
||||
PrefsHelper.getPref(PREF_CHROME_DYNAMICTOOLBAR, new PrefsHelper.PrefHandlerBase() {
|
||||
@Override
|
||||
public void prefValue(String pref, boolean value) {
|
||||
@ -475,6 +475,7 @@ abstract public class BrowserApp extends GeckoApp
|
||||
} else {
|
||||
// Immediately show the toolbar when disabling the dynamic
|
||||
// toolbar.
|
||||
mAboutHomeContent.setPadding(0, 0, 0, 0);
|
||||
mBrowserToolbar.cancelVisibilityAnimation();
|
||||
mBrowserToolbar.getLayout().scrollTo(0, 0);
|
||||
}
|
||||
@ -485,6 +486,13 @@ abstract public class BrowserApp extends GeckoApp
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isObserver() {
|
||||
// We want to be notified of changes to be able to switch mode
|
||||
// without restarting.
|
||||
return true;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user