android icon indicating copy to clipboard operation
android copied to clipboard

Disable auto scroll in the logs viewer

Open ngosang opened this issue 4 years ago • 3 comments

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

ngosang avatar Apr 07 '21 07:04 ngosang

The log view refreshes every x seconds, this probably resets the scroll position. I'd be happy to accept a PR for this improvement.

jmattheis avatar Apr 07 '21 17:04 jmattheis

I'd like to work on this.

mstuteja avatar Aug 24 '21 20:08 mstuteja

@mstuteja :+1:

jmattheis avatar Aug 25 '21 06:08 jmattheis

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 avatar Feb 08 '23 21:02 cyb3rko

@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.

jmattheis avatar Feb 09 '23 09:02 jmattheis

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?

cyb3rko avatar Feb 09 '23 09:02 cyb3rko

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.

jmattheis avatar Feb 09 '23 09:02 jmattheis

Alright, then let's keep it as is.

cyb3rko avatar Feb 09 '23 09:02 cyb3rko