Bug 1332955 - Consider restore data( for bookmark parent stack) when reloading home panels. r=ahunt

MozReview-Commit-ID: 7m6HOnfPLK3

--HG--
extra : rebase_source : f7351689302d98aaa9c7ebfe15c4046e661d8c9e
This commit is contained in:
Nevin Chen 2017-01-25 12:10:55 +08:00
parent 22c41867ed
commit d74baf7dcd

View File

@ -225,8 +225,9 @@ public class HomePager extends ViewPager implements HomeScreen {
// list of panels in place.
mTabStrip.setVisibility(View.INVISIBLE);
// If HomeConfigLoader already exist, force load to select the current item
if (lm.getLoader(LOADER_ID_CONFIG) != null) {
// If HomeConfigLoader already exist and there's no restoreData(for bookmark's parentStack),
// call forceLoad() to trigger updateUiFromConfigState() and reset HomePager's adapter.
if (lm.getLoader(LOADER_ID_CONFIG) != null && restoreData == null) {
lm.getLoader(LOADER_ID_CONFIG).forceLoad();
} else {
// Load list of panels from configuration