Closed Arthur-Milchior closed 6 days ago
they have no way to know what was deleted. The snackbar only show the number of deleted cads.
This problem was recently solved in Anki in https://github.com/ankitects/anki/pull/3058. We can use the same approach in AnkiDroid.
I am not confortable with the way deck deletion works today. We used to ask user to confirm that they want to delete a deck, before deleting it. This was changed in #11740 when introducing the new schema. As shown in https://github.com/ankidroid/Anki-Android/blob/5d3960521a9e98a5ff3cebdf05601931325157c1/AnkiDroid/src/main/java/com/ichi2/anki/DeckPicker.kt#L2225 it was deemed that it's not necessary to ask for confirmation anymore because this action is now undoable.
I have a few issues:
The problem with requesting a confirmation is that it takes more time. If someone were to delete a dozen of deck, that would be very frustrating. I don't think this is a scenario we want to optimize. Reducing the risk of data loss seems more important to me.
If we were to decide that actually, it's really acceptable not to ask for confirmation, then at least I think we should update the snackbar to let the user know which deck was deleted. (It may be interesting to update it anyway)
If we don't ask for confirmation, we should rename
confirmDeckDeletion
given that there is no confirmation anymore. And maybe delete the code ofDeckPickerConfirmDeleteDeckDialog
which is currently unused.There is a related question with shorcuts. Do we want the "delete" key to delete the deck ? If so, do we want to request a confirmation first ? This is what @SanjaySargam is doing in #16679. Personally, I don't think it's a good idea, because it's not clear what deck the user selected, and they can't easily change the selection with their keyboard (unless it's a split screen, in which case the selected deck is displayed on the trailing side of the screen). But if we actually were to use the shortcut, I think having a confirmation step is even more important than with the "delete deck" from the menu's entry