mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-20 19:38:21 +00:00
Fixing small bug where you could not cancel springloaded the first time you drag out of layout.
Change-Id: I29a76eb628b232a2853bc3ba3dd632328b376d4e
This commit is contained in:
@@ -39,10 +39,8 @@ public class SpringLoadedDragController implements OnAlarmListener {
|
||||
|
||||
// Set a new alarm to expire for the screen that we are hovering over now
|
||||
public void setAlarm(CellLayout cl) {
|
||||
if (mScreen != cl) {
|
||||
mAlarm.cancelAlarm();
|
||||
mAlarm.setAlarm(ENTER_SPRING_LOAD_HOVER_TIME);
|
||||
}
|
||||
mAlarm.cancelAlarm();
|
||||
mAlarm.setAlarm(ENTER_SPRING_LOAD_HOVER_TIME);
|
||||
mScreen = cl;
|
||||
}
|
||||
|
||||
@@ -52,7 +50,9 @@ public class SpringLoadedDragController implements OnAlarmListener {
|
||||
// Snap to the screen that we are hovering over now
|
||||
Workspace w = mLauncher.getWorkspace();
|
||||
int page = w.indexOfChild(mScreen);
|
||||
w.snapToPage(page);
|
||||
if (page != w.getCurrentPage()) {
|
||||
w.snapToPage(page);
|
||||
}
|
||||
} else {
|
||||
mLauncher.getDragController().cancelDrag();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user