Commit 92d87c7e authored by MinChen's avatar MinChen Committed by Commit Bot

Dismiss the launcher if the state is CLOSED when ending the drag from shelf.

Drag up the closing launcher on the shelf area and end with FLING_START event
with velocity_y that exceeds |kAppListDragVelocityThreshold| will end with
setting the launcher state to FULLSCREEN_ALL_APPS. But the state was already
set to CLOSED after close animation is started and hence setting state to
FULLSCREEN_ALL_APPS does not have effect. Should dismiss the launcher instead
of setting its state in this case.
Related cl: https://chromium-review.googlesource.com/c/chromium/src/+/667949

Bug: 766324
Change-Id: Ibac26da14cd18c99046b801c96c974484f5d30c6
Reviewed-on: https://chromium-review.googlesource.com/798321
Commit-Queue: min c <minch@chromium.org>
Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#520642}
parent 2d8e7928
...@@ -157,10 +157,12 @@ void AppListPresenterImpl::UpdateYPositionAndOpacity(int y_position_in_screen, ...@@ -157,10 +157,12 @@ void AppListPresenterImpl::UpdateYPositionAndOpacity(int y_position_in_screen,
void AppListPresenterImpl::EndDragFromShelf( void AppListPresenterImpl::EndDragFromShelf(
mojom::AppListState app_list_state) { mojom::AppListState app_list_state) {
if (view_) { if (view_) {
if (app_list_state == mojom::AppListState::CLOSED) if (app_list_state == mojom::AppListState::CLOSED ||
view_->app_list_state() == AppListViewState::CLOSED) {
view_->Dismiss(); view_->Dismiss();
else } else {
view_->SetState(AppListViewState(app_list_state)); view_->SetState(AppListViewState(app_list_state));
}
view_->SetIsInDrag(false); view_->SetIsInDrag(false);
view_->DraggingLayout(); view_->DraggingLayout();
} }
......
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