Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0a159792 authored by shawnlin's avatar shawnlin
Browse files

Fixed receiving deletion failed notification upon rotating the device after deleting a file

The Snackbar onDismissed() callback ran twice while rotating the device which caused this issue.

Remove the callback from Snackbar when it gets called.

Change-Id: Ifd5c2333d0481a840985603fef5794f6204404eb
Fixes: 113161630
Test: manual, 1) delete some files, 2) rotate device, 3) check this notification
parent 958f52a6
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -343,6 +343,9 @@ public class ActionHandler<T extends Activity & Addons> extends AbstractActionHa
                if (mDeletionSnackbar == snackbar) {
                    mDeletionSnackbar = null;
                }
                if (snackbar != null) {
                    snackbar.removeCallback(this);
                }
            }
        };
        mDeletionSnackbar = showDeletionSnackbar(mActivity, selection.size(), action, callback);