AquaMail Forum
English - Android => Bug reports => Topic started by: davidmark on December 29, 2015, 04:46:09 am
-
So I've been watching some "edge cases" in my system and it seems that IMAP pushed emails (usually come in a flurry rather than one at a time) are matched in reverse chronological order. Either that or it is quite a coincidence that all of them do that. Tried rearranging the order of the profiles to no effect. Just guessing at this point.
Is this intended? If so, can we reverse it to chronological order? Makes better sense to me; otherwise, the receiving systems must jump through extra hoops to process the messages in the order they were received by the sending system. Particularly irritating in something like Tasker, but will do if this behavior is written in stone. Of course, I don't want to do it if the behavior is subject to change.
If not intended, can you please fix this in a future release? The next one would be great! :)
Would have posted to Feature Request, but that forum is locked. One man's feature is another man's bug. This sure looks like an oversight rather than an intended behavior. Imagine most applications don't care about the order.
Otherwise, thanks for a great app! It's the only easy way I've found to trigger Tasker by IMAP Push. Has been invaluable, despite the occasional hiccup related to this issue.
Edited to note that after additional scrutiny, noticed I occasionally I get 2 for 1 notifications. Had one message processed, then two minutes later it matched again, along with a bookend message that had just come in. So 2 messages created 3 matches, in backwards order as usual and thus the recorded state was wrong, despite the 2 minute delay (confirmed from the log was enough for two Push sessions) between the messages. Now that's a bug for sure. If it hadn't done a duplicate match OR had processed them in chronological order, the recorded state would be correct. So if we can fix the latter issue by reversing the array (or whatever), the dupes won't be a problem.
-
"are matched in reverse chronological order"
Matched????
Oh, you mean by the Tasker condition plugin?
My code fires an event into Tasker "this condition may have changed" -- at the end of each folder's fully completed mail check process.
Then Tasker calls back into my code -- "you're saying it may have changed, well, is there an actual match right now"?
This too should be "once per folder" but is up to Tasker itself.
At this point, my code tells Tasker "yes, there is a match" producing message data (at most one message) or "there are no matches".
If there are multiple messages matching a particular condition, then my code -- to the best of my knowledge -- will match the newest message existing in the app at the time.
---
So to summarize, no, I'm not sure why the matching would be out of order.
Are messages *received* by the app -- apparently out of order too?
Can it be attributed to the random (but usually small) delays which happen between mail servers, "along the way"?