thunderbird-android icon indicating copy to clipboard operation
thunderbird-android copied to clipboard

Add a confirmation action for permanently deleting emails

Open PhilC813 opened this issue 1 year ago • 7 comments

Checklist

  • [X] I have used the search function to see if someone else has already submitted the same feature request.
  • [X] I will describe the problem with as much detail as possible.
  • [X] This issue only contains a request for one single feature, not multiple (related) features.

App version

6.800

Problem you are trying to solve

Prevent accidental deletion of emails in the "Trash", since after they're gone from there, they're gone for good.

One scenario when this can happen (as it just did to me): You delete an email from inbox, then realize you still had to check something. You go to the trash to get the email back, and verify what you needed to. Then, when you're done with it, you may forget that it's already in the trash, and so you click the "Delete" button again; it's gone for good.

Suggested solution

Add something similar to the Outlook for Android implementation (default), where a confirmation message is shown before being able to delete an email from the "Trash" folder, and which specifies that the deletion will be permanent.

Screenshots / Drawings / Technical details

Add a new action to the already existing "Confirm actions" menu of the Interaction settings section; maybe something called "Delete (in Trash)".

Screenshot_20240308-152951-452

I would assume that, by default, the confirmation message for these actions are generic, and so if this new action was to be implemented, having a personalized message (like done by Outlook devs) would be beneficial. Otherwise, a user who has multiple confirm actions enabled might confirm without thinking twice, which defeats the whole purpose of the confirmation feature.

PhilC813 avatar Mar 08 '24 20:03 PhilC813

@cketti I am new to this project. I hope my PR solves this issue. Would like you to review it.

beradeep avatar Mar 16 '24 12:03 beradeep

Thank you for committing to this!

Would the confirmation also appear for when you delete a message located in the trash but that you fetched using the search? In this context, it would make sense to have the message specify that it will be deleted from the trash, since search results, as of now, do not indicate the folder that messages are located in.

PhilC813 avatar Mar 17 '24 01:03 PhilC813

Thanks, I looked into it. Right now, I think there isn't any way to find out whether a result from a search in the unified inbox belongs to the trash folder.

beradeep avatar Mar 18 '24 09:03 beradeep

I don't think this should be limited to deleting messages from the trash folder. The app should ask for confirmation whenever a message is about to be deleted permanently. That includes deleting messages from the trash folder, but also applies when no trash folder is configured and deleting a message would permanently delete it right away.

I suggest using the following messages:

  • Do you want to permanently delete this message?
  • Do you want to permanently delete these messages?

A special case is deleting multiple messages from the message list. In that case some messages could be deleted permanently while others will be moved to the trash folder.

I suggest the following message for this special case:

  • Do you want to delete these messages, ${numberOfPermanentlyDeleted} of them permanently?

cketti avatar Mar 18 '24 11:03 cketti

Yes, that makes a lot of sense.

beradeep avatar Mar 18 '24 15:03 beradeep

Definitely the best way to implement this indeed! Well thought.

With that said, it would require a verification of the folder in which the selected messages are located. As @beradeep said, you can get a list of messages from multiple folders in the unified inbox, but it can also be the case if you initiate a search from any folder, and then change the mode to "search everywhere". — @beradeep said this capability doesn't seem possible currently.

PhilC813 avatar Mar 18 '24 19:03 PhilC813

It is possible to find out what folder a message is in. The app also uses this information to decide whether to move the message to the trash folder or delete it permanently. But that's a detail that belongs to the pull request discussion, not here.

cketti avatar Mar 19 '24 10:03 cketti