MiDiccio: Permanently Deleting Words from Trash
MiDiccio v1.4.4 lets you permanently delete words from Trash. It also changes what happens when you restore a backup with Replace.
This follows up on the previous post, where we said there was no permanent deletion yet. The first half summarizes what changed for users. The second half explains the mechanics for developers.
What changed
Section titled “What changed”Permanent deletion from Trash
Section titled “Permanent deletion from Trash”- You can now permanently delete words in Trash. Delete them one at a time, or empty Trash all at once.
- Permanently deleted words cannot be restored. If you use cloud sync, they are also removed from iCloud / Google Drive and your other devices.
- Even if another device is still on v1.4.1, permanently deleted words disappear from its Trash.
Words removed by Replace go to Trash
Section titled “Words removed by Replace go to Trash”- When you restore with Replace, words that aren’t in the backup now move to Trash. Before, they were removed without going to Trash.
- You can now restore everything in Trash at once. If you replaced with the wrong backup, you can bring the words back in one step.
- If you use cloud sync, words moved to Trash by Replace move to Trash on your other devices too.
- Words that are also in the backup are still overwritten with the backup content. The overwritten content doesn’t go to Trash, so it’s a good idea to back up your current data before replacing.
We also updated the Privacy Policy to v1.13 to describe how permanently deleted words are handled.
Developer notes
Section titled “Developer notes”From here on, it’s about how things work. This builds on “Sync rules” and “Deletion only sets a flag” in the previous post.
The open problems
Section titled “The open problems”Last time, we gave three reasons why there was no permanent deletion yet:
- Removing a word on one device doesn’t remove it from other devices or the cloud, so it comes back on the next sync.
- Permanent deletion needs a separate way to tell every device and the cloud that a word is gone for good.
- We also need to handle devices still running older versions of the app.
Empty the content instead of removing the record
Section titled “Empty the content instead of removing the record”The answer was to keep the record and overwrite it with an empty deleted record.
- Clear the word, meaning, notes, and tags, and keep only the “deleted” flag.
- Bump the updated time and mark it as “pending”.
- From there, regular sync carries it to other devices and the cloud through last-write-wins.
Because the record itself stays, it never “comes back” from the cloud on the next sync. All that remains is the ID that identifies the word, plus its timestamps. Treating permanent deletion as an edit that empties the content meant that, just like with Trash, we didn’t have to add any new sync rules.
Older versions are fine
Section titled “Older versions are fine”Compatibility with older versions happened to line up as well:
- Trash in v1.4.1 already hid deleted records with empty content.
- Earlier versions of the app sent records with empty content when deleting a word. The new deleted record has the same shape.
So even if another device is still on v1.4.1, a permanently deleted word simply disappears from its Trash without causing problems.
Syncing Replace as deletion
Section titled “Syncing Replace as deletion”Until now, Replace simply swapped the data on the device for the backup content. With cloud sync, this caused a problem:
- Words removed by Replace were still in the cloud.
- On the next sync, they came back as words that “exist only in the cloud”.
- → Replace didn’t do what it said. And without sync, there was no way to get the removed words back.
What changed in v1.4.4
- Words in the backup are still overwritten by ID, as before.
- Words not in the backup are kept, flagged as deleted, given a new updated time, and marked as pending.
- Words that were already in Trash are left as they are.
This is the same as a regular deletion, so the words go to Trash and the deletion syncs to other devices. Restore all brings back the words from before the Replace in one step.
Why we dropped “Undo a restore”
Section titled “Why we dropped “Undo a restore””In “What’s next” last time, we planned to save the state just before a restore so you could undo it once. This time we handled it by moving words removed by Replace to Trash instead, and dropped saving the previous state.
- The main problem with replacing from the wrong backup, “my words are gone”, can now be fixed from Trash.
- What remains is words that are also in the backup being overwritten with older content. With cloud sync, the newer content in the cloud wins on the next sync.
- Saving the whole previous state and undoing it raises many questions, such as how to send the undo to the cloud and when to discard the saved state. That’s too heavy for an app at personal scale.
Download
Section titled “Download”v1.4.4 is available on the App Store and Google Play.