android icon indicating copy to clipboard operation
android copied to clipboard

Last message doesn't get deleted when deleting messages individually

Open mamoit opened this issue 1 year ago • 5 comments

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

mamoit avatar Oct 04 '24 09:10 mamoit

I noticed that the server was outdated. Upgraded it to v2.5.0 and the issue still persists.

mamoit avatar Oct 04 '24 09:10 mamoit

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.

jmattheis avatar Oct 04 '24 12:10 jmattheis

Indeed, waiting for the snackbar to go away makes the last message deletion permanent. Thanks for identifying the issue.

mamoit avatar Oct 05 '24 06:10 mamoit

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?

tessus avatar Nov 25 '24 23:11 tessus

Yes, it's a bug that should be fixed.

jmattheis avatar Dec 01 '24 11:12 jmattheis