Undo card delete / option to confirm before deleting

bsh26

Member
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?
 
  • Like
Reactions:

mikelove

皇帝
Staff member
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.
 

bsh26

Member
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!
 
  • Like
Reactions:

mikelove

皇帝
Staff member
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.
 

Milly Law

Member
Same problem for me, either a recover/undo button or confirm delete.
i use a lot Pleco and it helped me improve a lot my Chinese. I have a very complex database and I’m devastated every time I loose a card.
 
  • Like
Reactions:

Member
Agree with all comments on this dialogue... I delete cards by accident regularly which is very annoying and causes me to lose all the places I have seen the word and the priority assigned to it--very damaging to my study method. Would prefer undo delete as a separate auto-created "Deleted" card category. Then you could select a deleted card from this category and opt to restore it. You could allow the user to delete all or have the app overwrite oldest entries after it reaches X number... say 100 or so. Still happy with a "confirm delete" dialogue--anything is better than having to restore from db.
 

Member
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.
Any ETA on this? Just accidentally deleted another card...
 
Top