Commit 06a752dd authored by Manu Cornet's avatar Manu Cornet Committed by Commit Bot

CrOS shelf: update separator as needed

This fixes a bug whereby when pinning or un-pinning an app in a way
that didn't require a reorder (e.g. pinning the leftmost running app)
did not cause the separator to appear.

Bug: 877348
Change-Id: I2f509a32f69f4779806430b4c08a96268171edef
Reviewed-on: https://chromium-review.googlesource.com/1187962Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
Commit-Queue: Manu Cornet <manucornet@chromium.org>
Cr-Commit-Position: refs/heads/master@{#585882}
parent aba45baa
...@@ -1923,6 +1923,11 @@ void ShelfView::ShelfItemChanged(int model_index, const ShelfItem& old_item) { ...@@ -1923,6 +1923,11 @@ void ShelfView::ShelfItemChanged(int model_index, const ShelfItem& old_item) {
AnimateToIdealBounds(); AnimateToIdealBounds();
else else
bounds_animator_->AnimateViewTo(new_view, old_ideal_bounds); bounds_animator_->AnimateViewTo(new_view, old_ideal_bounds);
// If an item is being pinned or unpinned, show the new status of the
// shelf immediately so that the separator gets drawn as needed.
if (old_item.type == TYPE_PINNED_APP || item.type == TYPE_PINNED_APP)
AnimateToIdealBounds();
return; return;
} }
......
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