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
Родитель 22c41867ed
Коммит d74baf7dcd
1 изменённых файлов: 3 добавлений и 2 удалений

Просмотреть файл

@ -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