Remove empty chats from the chat list

Note: I had previously opened this issue as https://github.com/deltachat/deltachat-android/issues/3905. I hereby open it as a feature request in the forum.

In the Settings for “Chats and Media”, below “Delete Old Messages”, I have set “Delete Messages from Device” to “After 5 weeks”. Most messages are indeed deleted from the device (also see the bug described in https://github.com/chatmail/core/issues/7170).

This causes my chat list to be filled with lots of empty chats. Both 1:1 chats and old group chats. I am not entirely sure if this is a bug or a feature. However, I would find it a lot more convenient if those empty chats were also removed from the chat list. All the old 1:1 contacts are still in the contacts table anyway, so I can start a new conversation with them at any time by searching their name and selecting the contact (rather than the chat with that contact). The old “groups” are exclusively long-retired multi-recipient email threads. These are almost exclusively of the sort where people just Cc a bunch of other people (including myself) so that nobody can say they haven’t been informed; but where they don’t expect any reply to their multi-Cc email at all. Therefore, my use case might be a little different from people who use Delta Chat in a setting where all of their peers also use Delta Chat. I myself use Delta Chat in a setting where almost all of my peers use different email clients.

In any case, I would find it very convenient if both old 1:1 chats and old group chats were automatically removed from my chat list. If you must, you could add two more toggles below “Delete Old Messages” so I can also select “Remove empty 1:1 conversations from chat list” and “Remove empty group conversations from chat list”. However, I would suggest that old chats be automatically removed from the chat list if “Delete Messages from Device” is set.

Also, one would need to ensure that empty chats are removed only when they are empty because they are old, not when they are empty because they are newly created. Seeing that there is already a created_timestamp in the chats table, those two cases should be easy to differentiate, however.