Bug 501075 - When switching rooms the history is always scrolled up slightly
Summary: When switching rooms the history is always scrolled up slightly
Status: RESOLVED FIXED
Alias: None
Product: NeoChat
Classification: Applications
Component: General (other bugs)
Version First Reported In: unspecified
Platform: Flatpak Linux
: NOR normal
Target Milestone: ---
Assignee: Tobias Fella
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-03-04 22:41 UTC by Justin Zobel
Modified: 2025-06-01 09:37 UTC (History)
3 users (show)

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


Attachments
Video (279.33 KB, video/webm)
2025-03-04 22:41 UTC, Justin Zobel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Justin Zobel 2025-03-04 22:41:17 UTC
Created attachment 179128 [details]
Video

SUMMARY
When switching rooms the history is always scrolled up slightly

STEPS TO REPRODUCE
1. Scroll to the bottom of two different rooms
2. Now switch between them

OBSERVED RESULT
See video

EXPECTED RESULT
Room history is at the bottom with nowhere to scroll

NeoChat: 25.03.70
KDE Flatpak runtime (Wayland)
libQuotient: 0.10.0 (built against 0.10.0)
KDE Frameworks: 6.11.0
Qt: Using 6.8.2 and built against 6.8.2
Build ABI: x86_64-little_endian-lp64
Kernel: linux 6.13.5-arch1-1
Comment 1 John Kizer 2025-03-17 05:24:33 UTC
I can almost always reproduce this on NeoChat 24.12.3. It almost feels intentional, like to prevent marking a room as read if it was clicked on but not interacted with?
Comment 2 Bug Janitor Service 2025-05-31 12:52:02 UTC
A possibly relevant merge request was started @ https://invent.kde.org/network/neochat/-/merge_requests/2304
Comment 3 James Graham 2025-06-01 09:37:34 UTC
Git commit dec5369a8f01d1e6cf35aa600ade071eb283941c by James Graham.
Committed on 01/06/2025 at 09:37.
Pushed by nvrwhere into branch 'master'.

Actually position the view at the end

It turns out that for whatever reason ListView.posiitionViewAtEnd() ignores any whitespace. This means that when we use the function it goes to the last delegate. This is no good as we have some padding at the bottom to make space for the typing indicator.

So the fix for this is stupid and involves adding a "spacer" delegate to the timeline beginning model which is completely invisible but qml see as a delegate so we can both leave the space and properly position the view at the end.

M  +1    -0    src/timeline/CMakeLists.txt
M  +5    -0    src/timeline/EventDelegate.qml
A  +11   -0    src/timeline/SpacerDelegate.qml     [License: GPL(3+eV) GPL(v3.0) GPL(v2.0)]
M  +0    -1    src/timeline/TimelineView.qml
M  +1    -0    src/timeline/enums/delegatetype.h
M  +4    -2    src/timeline/models/timelinemodel.cpp

https://invent.kde.org/network/neochat/-/commit/dec5369a8f01d1e6cf35aa600ade071eb283941c