Bug 456643

Summary: Collapsing/uncollapsing room category moves slider all the way up
Product: [Applications] NeoChat Reporter: Jan Bidler <janbidler00>
Component: GeneralAssignee: Tobias Fella <fella>
Status: RESOLVED FIXED    
Severity: normal CC: carl, james.h.graham
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Jan Bidler 2022-07-12 16:51:33 UTC
SUMMARY
When (un)collapsing a room category in the room viewer, NC repositions itself to always start back on top of the view

STEPS TO REPRODUCE
1. Login to neochat
2. Collapse your spaces

OBSERVED RESULT
View is all the way at the top again

EXPECTED RESULT
View should be where it was before

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 James Graham 2022-12-10 12:55:42 UTC
Can confirm this is related to the way the model is refreshed when changes are made. This would require moving to a tree model to fix.
Comment 2 James Graham 2024-02-19 20:09:46 UTC
Git commit fc6ea0b7791a694e57abdab74f1a471739769631 by James Graham, on behalf of Tobias Fella.
Committed on 19/02/2024 at 20:09.
Pushed by nvrwhere into branch 'master'.

Port RoomList to TreeView

Use a tree model for the room list

closes network/neochat#156

M  +6    -0    src/CMakeLists.txt
A  +97   -0    src/enums/neochatroomtype.h     [License: LGPL(v2.0+)]
M  +1    -91   src/models/roomlistmodel.cpp
M  +2    -53   src/models/roomlistmodel.h
A  +323  -0    src/models/roomtreemodel.cpp     [License: LGPL(v2.0+)]
A  +94   -0    src/models/roomtreemodel.h     [License: LGPL(v2.0+)]
M  +5    -108  src/models/sortfilterroomlistmodel.cpp
M  +0    -53   src/models/sortfilterroomlistmodel.h
A  +161  -0    src/models/sortfilterroomtreemodel.cpp     [License: GPL(v2.0+)]
C  +4    -3    src/models/sortfilterroomtreemodel.h [from: src/models/sortfilterroomlistmodel.h - 092% similarity]
M  +2    -2    src/neochatconnection.cpp
M  +1    -1    src/neochatroom.cpp
M  +1    -1    src/neochatroom.h
M  +1    -2    src/qml/ChooseRoomDialog.qml
M  +4    -1    src/qml/ExploreComponent.qml
M  +1    -2    src/qml/QuickSwitcher.qml
M  +13   -25   src/qml/RoomDelegate.qml
M  +128  -197  src/qml/RoomListPage.qml
M  +1    -6    src/qml/RoomPage.qml
A  +83   -0    src/qml/RoomTreeSection.qml     [License: GPL(3+eV) GPL(v3.0) GPL(v2.0)]
M  +8    -0    src/runner.cpp
M  +1    -1    src/runner.h
M  +2    -1    src/spacehierarchycache.cpp

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