element-hq / riot-android

A glossy Matrix collaboration client for Android
Apache License 2.0
1.4k stars 394 forks source link

After losing connectivity, new messages should be queued behind unsent ones to avoid ordering errors #2995

Open peoro opened 5 years ago

peoro commented 5 years ago

Same issue as https://github.com/vector-im/riot-web/issues/1890, but for riot-android.

If I send a message that fails to deliver, then another one and this one is delivered, the second message will be published before the first one.

Might be related to https://github.com/vector-im/riot-android/issues/2230 and https://github.com/vector-im/riot-android/issues/882.

I think that no new message should be sent when there are some that failed to deliver: it'd be better to wait for the undelivered messages to either be sent or cancelled.

peoro commented 5 years ago

Here a sequence of screenshots to show the problem on Riot Version 0.8.22 (F-59e927c79):

BTW, contrarily to what https://github.com/vector-im/riot-android/issues/882#issuecomment-274727592 says, it took almost 20 minutes for the message to fail sending, rather than ~16 seconds. But I guess the behavior might have changed, since that comment is 2 years old.