SimpleMobileTools / Simple-SMS-Messenger

An easy and quick way of managing SMS and MMS messages without ads.
https://www.simplemobiletools.com
GNU General Public License v3.0
600 stars 218 forks source link

Add support for recycle bin for messages #700

Closed esensar closed 1 year ago

esensar commented 1 year ago

This adds support for moving messages to recycle bin instead of deleting them right away. The feature is not active by default.

This closes #451

TODO

esensar commented 1 year ago

Basic support for recycle bin for messages is here, but there are some things that I would like to clear up, since I am not really sure how to handle them:

tibbi commented 1 year ago
  1. yes, do not move scheduled messages to trashbin
  2. lets make it similar to how archive was and is done, similar UI to main screen. Recheck which menu items make sense and which dont
esensar commented 1 year ago

I would also like to reuse some of the stuff that is done in https://github.com/SimpleMobileTools/Simple-SMS-Messenger/pull/698, so it would be good to get that one merged before this. I will still do some work on this one for testing purposes, but I won't be able to finalize it before that one gets merged.

esensar commented 1 year ago

This is now ready for testing and review. There is one thing that I am not sure how to best handle. I don't think it is handled in the gallery either.

Right now, when we disable recycle bin, we just ignore that it exists, but items are still there in the recycle bin. If user re-enables it after a long time, these items will be deleted because enough time has passed. Should we restore all messages when recycle bin is disabled, or is this behavior fine?

tibbi commented 1 year ago

that behaviour is fine. Delete stuff after 30 days, do not care about any settings.

tibbi commented 1 year ago

lets mention the recycle bin at deleting a message, like in the gallery. Use the move_to_recycle_bin_confirmation string from commons

tibbi commented 1 year ago

conversation snippet below the title in the recycle bin is wrong, it shows the same message snippet as on the main screen, even if the deleted messages have other text

esensar commented 1 year ago

Queries became a bit more complex now for reading conversations, because I had to ensure that both regular and recycle bin threads display correct snippet, since both can be affected depending if latest or some older message was moved to recycle bin.

tibbi commented 1 year ago

well, as long as it works, it shouldnt be a big issue :) I dont expect people having millions of messages, so it should be quick too

tibbi commented 1 year ago

nice thanks, looks good now