Bug 457999 - Initial view option opens wrong view with certain embedded categories
Summary: Initial view option opens wrong view with certain embedded categories
Status: RESOLVED FIXED
Alias: None
Product: Elisa
Classification: Applications
Component: general (other bugs)
Version First Reported In: unspecified
Platform: Other Linux
: NOR minor
Target Milestone: ---
Assignee: Matthieu Gallien
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-08-17 15:23 UTC by Yerrey Dev
Modified: 2023-10-05 18:37 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yerrey Dev 2022-08-17 15:23:35 UTC
Having embedded category enabled will change the indexes of the left side view list, and this causes setting the initial view to certain index being incorrect. For example having Albums embedded category enabled, and having Initial View set to Tracks, when Elisa is opened, the initial view will be opened at Genres as one of the indexes is removed due to embedded category.


STEPS TO REPRODUCE
1. Enable Albums embedded category, and enable initial view to Tracks
2. Restart Elisa

OBSERVED RESULT
Initial view is Genres.

EXPECTED RESULT
Initial view is Tracks.

SOFTWARE/OS VERSIONS
Elisa master
Comment 1 Nate Graham 2022-08-17 20:10:34 UTC
Darn, I thought we fixed this. Can reproduce.
Comment 2 Bug Janitor Service 2022-08-18 20:23:46 UTC
A possibly relevant merge request was started @ https://invent.kde.org/multimedia/elisa/-/merge_requests/382
Comment 3 Bug Janitor Service 2023-09-26 14:35:40 UTC
A possibly relevant merge request was started @ https://invent.kde.org/multimedia/elisa/-/merge_requests/496
Comment 4 Nate Graham 2023-10-05 18:37:41 UTC
Git commit b353149c4da0ef8b629553c5a2bd46001c764b4d by Nate Graham, on behalf of Jack Hill.
Committed on 05/10/2023 at 20:32.
Pushed by ngraham into branch 'master'.

Refactor embedded sidebar category to make use of ViewsProxyModel

Instead of editing the source model we can use ViewsProxyModel to just
hide the embedded category in the sidebar.

M  +178  -163  autotests/viewsmodeltest.cpp
M  +3    -1    src/models/viewsmodel.cpp
M  +1    -0    src/models/viewsmodel.h
M  +42   -0    src/models/viewsproxymodel.cpp
M  +28   -1    src/models/viewsproxymodel.h
M  +1    -0    src/qml/ContentView.qml
M  +5    -96   src/viewslistdata.cpp
M  +2    -0    src/viewslistdata.h

https://invent.kde.org/multimedia/elisa/-/commit/b353149c4da0ef8b629553c5a2bd46001c764b4d