Commit 6074b224 authored by Weidong Guo's avatar Weidong Guo Committed by Commit Bot

Speculative fix for single item page

After powerwash and sign in, the internal app item and page break item's
positions may be out of sync because model updater is not set. Then the
user has to wait til next sign in to get the most up to date position.
During the first sign in, the user may reorder or install new apps which
triggers single item page after next sign in.

Changes:
Set model updater for internal app and page break item.

Bug: 873853
Change-Id: I492234ceaf107deffdba056856a4f0a3c5df59e0
Reviewed-on: https://chromium-review.googlesource.com/c/1355178Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
Commit-Queue: Weidong Guo <weidongg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#612500}
parent 66378d75
...@@ -41,6 +41,9 @@ InternalAppItem::InternalAppItem( ...@@ -41,6 +41,9 @@ InternalAppItem::InternalAppItem(
UpdateFromSync(sync_item); UpdateFromSync(sync_item);
else else
SetDefaultPositionIfApplicable(model_updater); SetDefaultPositionIfApplicable(model_updater);
// Set model updater last to avoid being called during construction.
set_model_updater(model_updater);
} }
InternalAppItem::~InternalAppItem() = default; InternalAppItem::~InternalAppItem() = default;
......
...@@ -24,6 +24,9 @@ PageBreakAppItem::PageBreakAppItem( ...@@ -24,6 +24,9 @@ PageBreakAppItem::PageBreakAppItem(
} }
SetDefaultPositionIfApplicable(model_updater); SetDefaultPositionIfApplicable(model_updater);
// Set model updater last to avoid being called during construction.
set_model_updater(model_updater);
} }
PageBreakAppItem::~PageBreakAppItem() = default; PageBreakAppItem::~PageBreakAppItem() = default;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment