mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-28 15:56:49 +00:00
Stop DeleteDropTarget from setting the containerId of items to NO_ID
When deleting items, the items wont get removed form the database right away to give time for the user to undo the operation if needed. When rotating the screen the items get loaded again, even those items marked for deletion who hasn't been deleted yet, and because they have the container to NO_ID it cause Launcher to crash. There is no need to set the containerId to NO_ID because the trigger to finally remove the items gets called when the toast to undo disappears and rotating the screen triggers the toast to disapear. It might be posible for the item to flash in the workspace if it gets render before deleting after rotation but it's so fast that I haven't seen that issue. Fix: 262199032 Test: Manuall test: remove item from hotseat, rotate device before toast with undo button disapears. Change-Id: Ia8726941dc81078b49b32565daa32fadf3ae45ba
This commit is contained in:
committed by
Sebastián Franco
parent
8a53e78f22
commit
b0b6a212b8
@@ -121,7 +121,6 @@ public class DeleteDropTarget extends ButtonDropTarget {
|
||||
public void onDrop(DragObject d, DragOptions options) {
|
||||
if (canRemove(d.dragInfo)) {
|
||||
mLauncher.getModelWriter().prepareToUndoDelete();
|
||||
d.dragInfo.container = NO_ID;
|
||||
}
|
||||
super.onDrop(d, options);
|
||||
mStatsLogManager.logger().withInstanceId(d.logInstanceId)
|
||||
|
||||
Reference in New Issue
Block a user