Bug 456647 - When opening a read room, neochat scrolls somewhere randomly up
Summary: When opening a read room, neochat scrolls somewhere randomly up
Status: RESOLVED FIXED
Alias: None
Product: NeoChat
Classification: Applications
Component: General (show other bugs)
Version: unspecified
Platform: Other All
: NOR normal
Target Milestone: ---
Assignee: Tobias Fella
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-07-12 17:37 UTC by Jan Bidler
Modified: 2022-12-28 17:36 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Bidler 2022-07-12 17:37:10 UTC
SUMMARY
Sadly no idea how to repro this, but it is really annoying behavior.
There seems to be one weird condition, that causes clicking on already fully read rooms, to open them with the view not fully scrolled down to the bottom, but instead being scrolled somewhere up. How many messages are being scrolled up *seems* to differ from room to room.

STEPS TO REPRODUCE
1. Open NeoChat
2. ????
3. Open a read room

OBSERVED RESULT
NeoChat will open the room somewhere scrolled up

EXPECTED RESULT
NeoChat should open the room at the bottom.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 5.25.3
KDE Frameworks Version: 5.96.0
Qt Version: 5.15.5
Kernel Version: 5.18.9-arch1-1 (64-bit)
Graphics Platform: Wayland
NeoChat: 22.06
Comment 1 darhma 2022-11-09 15:25:16 UTC
I confirm the problem, unfortunately I don't know how to reproduce it either, it seems a random thing. 
NeoChat version 22.09
Operating System: NixOS 22.11
KDE Plasma Version: 5.26.2
KDE Frameworks Version: 5.99.0
Qt Version: 5.15.7
Kernel Version: 6.0.6 (64-bit)
Graphics Platform: X11
I add that the expected result should be to open the chat to the first unread message rather than the last message.
Comment 2 Jan Bidler 2022-11-09 16:33:13 UTC
AFAIK it has something to do with the focus somehow getting on some text element. Because if you spam down-arrow until you arrive at the bottom, this stops if I recall correctly (or at the very least, it changes where the room will scroll up to when viewed)
Comment 3 Aranjedeath 2022-11-14 16:26:46 UTC
I have this problem as well. It looks (behavior-wise) like there is a(n invisible) cursor in the list of messages, and Neochat brings you to the cursor when you re-open a room. Cursor position doesn't appear to be updated by anything other than arrow keys (up/down), including marking a room as read or manually clearing the read-indicator.
Comment 4 darhma 2022-11-14 16:39:24 UTC
Yes, eventually the presence of the cursor should indicate the last message read (or the first one to be read), and in my opinion if it worked well that would be the behavior one would expect, but it seems to work completely randomly.
Comment 5 James Graham 2022-11-17 10:41:37 UTC
Worth noting the old gitLab issue for any relevant info https://invent.kde.org/network/neochat/-/issues/525
Comment 6 Bug Janitor Service 2022-12-28 10:20:40 UTC
A possibly relevant merge request was started @ https://invent.kde.org/network/neochat/-/merge_requests/728
Comment 7 James Graham 2022-12-28 17:36:21 UTC
Git commit 884484922dfab5dce7735f914c5e715d02bfcc7f by James Graham.
Committed on 28/12/2022 at 17:36.
Pushed by nvrwhere into branch 'master'.

Fix Room Initial Position

When the room is changed set the roomlist view to the bottom making sure that it isn't in some random place.

M  +1    -0    src/qml/Page/RoomPage.qml

https://invent.kde.org/network/neochat/commit/884484922dfab5dce7735f914c5e715d02bfcc7f