зеркало из https://github.com/mozilla/gecko-dev.git
Bug 723103 - Update about:home's top sites section after history is cleared (r=mfinkle)
This commit is contained in:
Родитель
dd7b9bacb4
Коммит
7b889fe92a
|
@ -68,6 +68,7 @@ class ConfirmPreference extends DialogPreference {
|
|||
BrowserDB.clearHistory(mContext.getContentResolver());
|
||||
GeckoApp.mAppContext.mFavicons.clearFavicons();
|
||||
GeckoAppShell.sendEventToGecko(GeckoEvent.createBroadcastEvent("browser:purge-session-history", null));
|
||||
GeckoApp.mAppContext.handleClearHistory();
|
||||
}
|
||||
});
|
||||
} else if ("clear_private_data".equalsIgnoreCase(mAction)) {
|
||||
|
|
|
@ -797,6 +797,18 @@ abstract public class GeckoApp
|
|||
});
|
||||
}
|
||||
|
||||
void handleClearHistory() {
|
||||
if (mAboutHomeContent == null)
|
||||
return;
|
||||
|
||||
GeckoApp.mAppContext.mMainHandler.post(new Runnable() {
|
||||
public void run() {
|
||||
mAboutHomeContent.update(GeckoApp.mAppContext,
|
||||
EnumSet.of(AboutHomeContent.UpdateFlags.TOP_SITES));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public StartupMode getStartupMode() {
|
||||
// This function might touch the disk and should not
|
||||
// be called from UI's main thread.
|
||||
|
|
Загрузка…
Ссылка в новой задаче