android
android copied to clipboard
Disable auto scroll in the logs viewer
Gotify/Android 2.1.0
Steps to reproduce:
- Open the log viewer
- Scroll down
- After a few seconds the scroll moves to the top and I can't read the messages
The log view refreshes every x seconds, this probably resets the scroll position. I'd be happy to accept a PR for this improvement.
I'd like to work on this.
@mstuteja :+1:
Can't reproduce this bug ~in Version 2.5.1~ on the current development snapshot.
Even when new log entries appear, the scroll position does not change?
Any other opinions?
@cyb3rko I can reproduce it, see Peek 2023-02-09 10-08.webm (ApiVersion 33)
it's most likely due to com.github.gotify.log.LogsActivity#updateLogs which updates the text view.
Yes, the fix shoudn't be too hard.
But still I wonder why you encounter these problems while I do not.
I haven't tested it on an Emulator but on my physical phone (ApiVersion 33 as well) everything works fine.
What do you think would be the best solution for that?
A FloatingActionButton to pause and resume the log updates, an entry in the overflow menu at the top right or something else?
I only can reproduce it on an emulator. But I'm pretty sure that I could reproduce it in the past on my physical device. Maybe it's some weird compatibility layer on the emulator that forces this bug https://stackoverflow.com/a/28306485/4244993
I'd be okay with closing this ticket, as it is apparently fixed on newer, not emulated phones. We could store the scroll position and adjust it accordingly, when the textview is updated.
Alright, then let's keep it as is.