-
-
Notifications
You must be signed in to change notification settings - Fork 106
fix: Order of messages if Sentbox is synced before Inbox #5813
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The test i added here isn't needed, there's |
4ea6d9d
to
ce4be1d
Compare
3214eb6
to
6c01309
Compare
ce4be1d
to
da4a84e
Compare
Btw, i think it may be useful to display these outgoing received messages (i.e. from other MUAs/devices) somehow differently e.g. align them to the left as incoming ones. As they still have another brightness (even in Dark mode), it shouldn't be a problem to differ them from incoming messages. May be even useful for shared/community accounts, not sure. CC @adbenitez |
Recently i started to see my messages weirdly ordered around incoming ones every day when i open my laptop lid (i.e. i see my replies above incoming messages). I don't know whether Delta Chat started scheduling smth differently or i changed its usage pattern, but this PR should help it seems. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The PR description is quite short, the PR is easier to understand if the PR description has a short explanation in which way the logic was changed.
Btw, i think it may be useful to display these outgoing received messages (i.e. from other MUAs/devices) somehow differently e.g. align them to the left as incoming ones. As they still have another brightness (even in Dark mode), it shouldn't be a problem to differ them from incoming messages.
I'm pretty sure that non-technical users would find this super confusing.
Msg#11: Me (Contact#Contact#Self): I'm Alice too √ | ||
Msg#11: Me (Contact#Contact#Self): I'm Alice too |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, this means that this is a breaking change (i.e. will need UI adaptions)? If so, this PR should start with fix!
instead of fix
, and the PR description should mention this.
And, it means that outgoing messages that were sent by a different device won't have any checkmarks anymore? I personally don't think that's a good idea because that's not how users know it from other messengers, but if others think otherwise, I'd be happy to be outvoted / convinced otherwise.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, it shouldn't be a breaking change, i forgot to map OutRcvd
to OutDelivered
in all APIs. Fixed this.
EDIT: Only for REPL the display of received outgoing messages changes.
da4a84e
to
c564e75
Compare
91eaf72
to
8bbee4a
Compare
I put everything to commit messages to avoid updating the PR description every time they change. Probably it's better to leave the PR description empty then or just reference the commit messages.
Probably yes, though for shared/community accounts this may be useful, but then also we need to check for presence of |
8bbee4a
to
3470b26
Compare
3470b26
to
f3ff8e3
Compare
f3ff8e3
to
ae0d404
Compare
This fixes a Gmail-like scenario when outgoing messages are saved to Sentbox as well and it is fetched before Inbox by chance, by adding a new `OutRcvd` message state for received outgoing messages so that they can mingle with fresh incoming ones. As for `OutPending`, `OutDelivered` etc. messages, they are sent locally by the user and there's no need to make them more noticeable even if they are newer. All APIs still return `OutDelivered` instead of `OutRcvd` for compatibility.
ae0d404
to
3a4af2b
Compare
closing stale pr, to avoid more resources put in here from the issue description, it is eg. about since years discouraged "shared account usage" with eg. gmail, which we do not want to care for, let alone introduce a state that is otherwise not needed. also, we do not want to continue "upload messages via imap" this is about to be removed at some point. same for "watch sent folder" and maybe other dependencies on imap standing in the way of thinking about new ways of transport and resilience (as they cost resources, time and money we do not have) |
The issue is about Delta Chat -only usage with Gmail, but with "Watch Sent folder" enabled (i quite rarely use other clients, so it's mostly enabled just in case). I.e. while the option is enabled for "shared usage", it makes harm for Delta Chat -only usage, sometimes i just can't understand my previous conversations when i open my laptop lid because all messages are ordered almost randomly. "Save messages to savebox" ("Sent" folder actually) is Gmail's behavior, we can't do anything with it. Gmail's "Sent" folder is actually a label and all messages you send are duplicated there (they even have the same Message-ID). I'll try to reproduce it w/o "Watch Sent folder" (already tried to disable it, but forgot whether that helped). It's probably difficult to catch the bug w/o "Watch Sent folder":
But apart from this the PR fixes ordering messages for "shared account usage" because in this case received outgoing messages (which may be sent by another user/device) should be sorted the same way as incoming ones and defenitely not break sorting of them. Currently, if we receive an outgoing message, it works as a barrier for incoming messages (even if the chat isn't open at the moment), so they can't be ordered purely by their "Date". |
thanks for confirming. i clarified the post above bit. |
Related issue seemingly describing the same problem: deltachat/deltachat-android#3900 |
"Watch Sent folder" was always a questionable option of questionable worth. we were thinking about removing "Watch Sent folder" already years ago, and left it, as it "did not hurt". but that has changed now, we should remove the option alltogether now that will remove one footgun of ppl going for shared account usage, while at the same time removing complexity and effort for us |
It's impossible to reproduce the bug just this way because So the summary is:
|
See commit messages.
My devices go online/offline independently and i use both to send messages, so often i see my messages wrongly ordered around incoming messages.