Adding a delay to deleting items would allow the user to cancel deleting an item before it is actually deleted. When deleting an item, show a snackbar to the user with an undo button.
Make sure that the delete task is executed in a new thread, then start by having a thread sleep for maybe 5k-10k ms and then send an interrupt if the user wishes to undo their action.
Description
Adding a delay to deleting items would allow the user to cancel deleting an item before it is actually deleted. When deleting an item, show a snackbar to the user with an undo button.
Make sure that the delete task is executed in a new thread, then start by having a thread sleep for maybe 5k-10k ms and then send an interrupt if the user wishes to undo their action.