Bug 448620

Summary: Selecting different source adds an additional (identical) screenshot to the preview gallery
Product: [Applications] Discover Reporter: postix <postix>
Component: discoverAssignee: Dan Leinir Turthra Jensen <leinir>
Status: RESOLVED FIXED    
Severity: normal CC: aleixpol, postix
Priority: NOR    
Version First Reported In: 5.23.5   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Screen recording

Description postix 2022-01-16 20:10:58 UTC
Created attachment 145558 [details]
Screen recording

STEPS TO REPRODUCE
1. Select package "Kalzium"
2. Choose "Flatpak" as source
3. Choose "Repo as a source

OBSERVED RESULT
At step 2 and 3 additional but identical screenshots are added to the preview gallery. Please see the screen recording.


SOFTWARE/OS VERSIONS
Operating System: openSUSE Tumbleweed 20220114
KDE Plasma Version: 5.23.5
KDE Frameworks Version: 5.90.0
Qt Version: 5.15.2
Kernel Version: 5.16.0-1-default (64-bit)
Graphics Platform: X11
Comment 1 Aleix Pol 2022-01-17 19:18:47 UTC
Git commit 2c1cfe48daaeca6e8494f6eeafcc6a6f01c29d3c by Aleix Pol.
Committed on 17/01/2022 at 19:18.
Pushed by apol into branch 'master'.

Clear the screenshot model as we change resources

M  +5    -0    libdiscover/ScreenshotsModel.cpp

https://invent.kde.org/plasma/discover/commit/2c1cfe48daaeca6e8494f6eeafcc6a6f01c29d3c
Comment 2 Aleix Pol 2022-01-17 19:19:00 UTC
Git commit 51de1e262b0d4368bde0194991caf17f986d5449 by Aleix Pol Gonzalez, on behalf of Aleix Pol.
Committed on 17/01/2022 at 19:18.
Pushed by apol into branch 'Plasma/5.24'.

Clear the screenshot model as we change resources


(cherry picked from commit 2c1cfe48daaeca6e8494f6eeafcc6a6f01c29d3c)

M  +5    -0    libdiscover/ScreenshotsModel.cpp

https://invent.kde.org/plasma/discover/commit/51de1e262b0d4368bde0194991caf17f986d5449