Last message doesn't get deleted when deleting messages individually
The last message of the list never gets deleted if I manually delete the messages one by one in the "trash bin" icon. Well, it seems like it gets deleted since it disappears from the screen, but the message "There are no messages, yet." doesn't show up, and if you close and open the app again, it's still there, and if you delete it it will come back once you close and open the app again.
The only way to clean up the last message through the android app seems to be by pressing the "delete all messages" button.
I can consistently reproduce this issue.
I'm Running:
gotify/android v2.8.1
gotify/server v2.4.0
I noticed that the server was outdated.
Upgraded it to v2.5.0 and the issue still persists.
Currently a message is only deleted server side when the snackbar with the undo button disappeared. I guess if the app is closed before that happens the delete isn't finished in the background.
Indeed, waiting for the snackbar to go away makes the last message deletion permanent. Thanks for identifying the issue.
Just ran into this as well.
I have to say that this is a bit confusing, because "closing" is relative on Android. IMO the term "closing" means really removing it from the open apps or a force stop. But when I hit the "home" button or the "back" button, the app is technically still open. Just not in the main thread. So.... this issue currently requires me to wait 1 or 2 seconds and only then can I switch to another app.
Is there any chance this can be implemented differently?
Yes, it's a bug that should be fixed.