Undo card delete / option to confirm before deleting

#1
I keep accidentally deleting cards when trying to do things too quickly. I think it'd be useful (and a trivial feature) to confirm before deletion, or less trivial but also useful to have an undo feature.

On a side note, is there a way to take the union of card backup databases, as a crude manual way to undelete stuff? E.g. are there details on the backups' file format somewhere?
 

mikelove

皇帝
Staff member
#2
Sorry, where are you accidentally deleting them? Most of our delete buttons already have a confirmation dialog (or at least they should).

Database union: no, format isn't documented and as we're about to throw it out the window for 4.0 we're unlikely to ever document it. But FWIW in the current format the data for a particular card lives in three places:

1) The card record itself in the cards table;
2) Any category assignments, in the category assignments table; and
3) Its score data in the various 'scores' tables.

So if you copy over those records for a card from your backup that should give you the deleted card back.
 
#3
Sorry should've clarified! In an dictionary entry, pressing the + button where a card already exists creates a "Duplicate card" popup dialog box. Here, I sometimes fat-fingeredly press the "delete card" button when intending to press "card info", but this doesn't pop up a confirmation.

There might be a similar-looking dialog box (i.e. with a title other than "Duplicate card") that appears elsewhere? (if so I don't recall when it shows up)

Aha, those files are sqlite! Got it, thanks a bunch!

PS: Pleco is an amazing app, thank you for making such a useful and well-polished tool!
 

mikelove

皇帝
Staff member
#4
Thanks!

Ah, makes sense. We're actually planning to consolidate that screen and Card Info into a single dialog in 4.0, but will see if we can do anything about making that button at least a bit harder to press by accident in the meantime.
 
Top