mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-19 10:48:19 +00:00
Fixing issue where you couldn't drag an item multiple pages (issue 10754544)
-> This was caused by a strange race condition. The page snap time was equal to the delay to recheck whether to snap (in DragController). This meant that scrollRight()/Left() would get called, and the scroller would be finished however, the final computeScrollHelper() hadn't been called, so the mCurrentPage hadn't yet been incremented. -> Fixed the underlying race condition. -> Added suitable gap (150 ms) between the two delays. Change-Id: If700eb9e14d77a174e4395ca6933119bdb0da768
This commit is contained in:
@@ -1748,25 +1748,17 @@ public class Workspace extends SmoothPagedView
|
||||
|
||||
protected void onStartReordering() {
|
||||
super.onStartReordering();
|
||||
int count = getChildCount();
|
||||
for (int i = 0; i < count; i++) {
|
||||
((CellLayout) getChildAt(i)).setUseActiveGlowBackground(true);
|
||||
}
|
||||
showOutlines();
|
||||
|
||||
// Reordering handles its own animations, disable the automatic ones.
|
||||
setLayoutTransition(null);
|
||||
}
|
||||
|
||||
protected void onEndReordering() {
|
||||
super.onEndReordering();
|
||||
int count = getChildCount();
|
||||
for (int i = 0; i < count; i++) {
|
||||
((CellLayout) getChildAt(i)).setUseActiveGlowBackground(false);
|
||||
}
|
||||
hideOutlines();
|
||||
|
||||
hideOutlines();
|
||||
mScreenOrder.clear();
|
||||
int count = getChildCount();
|
||||
for (int i = 0; i < count; i++) {
|
||||
CellLayout cl = ((CellLayout) getChildAt(i));
|
||||
mScreenOrder.add(getIdForScreen(cl));
|
||||
|
||||
Reference in New Issue
Block a user