Conversation
a5aa2bb to
f640c65
Compare
|
|
||
| /// Requests to clear storage on all chatmail relays. | ||
| /// | ||
| /// I/O must be started for this request to take effect. |
There was a problem hiding this comment.
| /// I/O must be started for this request to take effect. | |
| /// I/O must be started for this request to take effect. | |
| /// | |
| /// UIs should only offer this option if a chatmail relay is being used. |
There was a problem hiding this comment.
There is no good way to check if chatmail relay is used currently. There is is_chatmail, but it gets stuck being true if you add chatmail relay and then remove it. I think it's better to just always offer the option, worst case it will do nothing for non-chatmail users but they are unlikely to want to even click the option. Otherwise we are adding more is_chatmail checks and we want to get rid of is_chatmail.
| // Only doing this for chatmail relays to avoid | ||
| // accidentally deleting all emails in a shared mailbox. | ||
| let should_clear_imap_storage = | ||
| clear_storage_request_receiver.try_recv().is_ok() && session.is_chatmail(); |
There was a problem hiding this comment.
Would be nice to print an info to the log if the it was requested to clear storage, but is_chatmail() is false
There was a problem hiding this comment.
This is_chatmail() is for an IMAP session, not global. So you can have two transports, the first that is not chatmail and another chatmail that you added later. If you request to clear storage, it will clear storage of chatmail transport, but not the first non-chatmail transport. Writing "not clearing non-chatmail" to the log each time looks like more log noise to me.
f640c65 to
36c0fa1
Compare
There was a problem hiding this comment.
works, i tested with iOS at deltachat/deltachat-ios#3078
it seems to take some seconds until the connectivity view is actually updated, but that seems fine; the option is not for everyday use, in general, it is only the "last resort" and maybe only "for now", we aim to get better at automatic storage management
36c0fa1 to
10ab556
Compare
Closes #7730
I tested it with desktop: deltachat/deltachat-desktop#6207