Bug 407471 - Ratings in app lists don't appear until dirty state has been cleared and you navigate somewhere else and back
Summary: Ratings in app lists don't appear until dirty state has been cleared and you ...
Status: RESOLVED FIXED
Alias: None
Product: Discover
Classification: Applications
Component: discover (show other bugs)
Version: 5.15.5
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Dan Leinir Turthra Jensen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-05-12 21:18 UTC by Nate Graham
Modified: 2019-05-17 13:23 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 5.16.0


Attachments
Ratings only appear after dirty state cleared (1.95 MB, video/webm)
2019-05-12 21:18 UTC, Nate Graham
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nate Graham 2019-05-12 21:18:16 UTC
Created attachment 120023 [details]
Ratings only appear after dirty state cleared

SUMMARY
Discover 5.15.5 on Manjaro as well as git master on Neon


STEPS TO REPRODUCE
1. Open Discover after not having opened it for a few hours


OBSERVED RESULT
Apps on the Featured page all have no ratings. After Discover has finished checking for updates, if you navigate elsewhere and then return to the Featured page, then the apps do show ratings

After this, if you close Discover and re-open it, apps on the Featured page have ratings again. If you close Discover, wait a few hours, and then re-open it, they'll be gone again.


EXPECTED RESULT
Apps should always show ratings irrespective of whether or not Discover needs to update its list of available updates or how long it has been since you last opened Discover


ADDITIONAL INFORMATION
It seems like Discover has an internal "dirty state" that gets set after a few hours that makes it perform a check for updates. Before this dirty state has been cleared, this problem is 100% reproducible.

Similar problems are seen with installing apps and performing updates when the state is dirty:

- https://bugs.kde.org/show_bug.cgi?id=402928: If the update state is dirty, clicking on the "Install" button triggers fetching updates rather than actually installing the app

- https://bugs.kde.org/show_bug.cgi?id=402104: If the update state is dirty, clicking on the "Update All" button triggers fetching updates rather than actually performing updates
Comment 1 Aleix Pol 2019-05-16 15:03:09 UTC
Git commit 64701d25a2c89562be9ea9ac19e5a636361af958 by Aleix Pol.
Committed on 16/05/2019 at 15:02.
Pushed by apol into branch 'master'.

snap & packagekit: Refresh ratings when they arrive

As we already did for Flatpak.

M  +1    -1    libdiscover/appstream/AppStreamIntegration.cpp
M  +12   -2    libdiscover/appstream/OdrsReviewsBackend.cpp
M  +2    -2    libdiscover/appstream/OdrsReviewsBackend.h
M  +6    -15   libdiscover/backends/FlatpakBackend/FlatpakBackend.cpp
M  +3    -1    libdiscover/backends/PackageKitBackend/PackageKitBackend.cpp
M  +7    -3    libdiscover/backends/SnapBackend/SnapBackend.cpp
M  +3    -1    libdiscover/backends/SnapBackend/SnapBackend.h

https://commits.kde.org/discover/64701d25a2c89562be9ea9ac19e5a636361af958
Comment 2 Nate Graham 2019-05-17 13:19:09 UTC
Fixed, thanks!

We still have a minor issue that the list delegates all show no ratings for a moment, and then the ratings appear a second later. Tracking that in Bug 407641.
Comment 3 Aleix Pol 2019-05-17 13:23:14 UTC
Git commit e610cd1840de891cc3928e66b2ae49e891752c37 by Aleix Pol.
Committed on 17/05/2019 at 13:22.
Pushed by apol into branch 'Plasma/5.16'.

snap & packagekit: Refresh ratings when they arrive

As we already did for Flatpak.

M  +1    -1    libdiscover/appstream/AppStreamIntegration.cpp
M  +12   -2    libdiscover/appstream/OdrsReviewsBackend.cpp
M  +2    -2    libdiscover/appstream/OdrsReviewsBackend.h
M  +6    -15   libdiscover/backends/FlatpakBackend/FlatpakBackend.cpp
M  +3    -1    libdiscover/backends/PackageKitBackend/PackageKitBackend.cpp
M  +7    -3    libdiscover/backends/SnapBackend/SnapBackend.cpp
M  +3    -1    libdiscover/backends/SnapBackend/SnapBackend.h

https://commits.kde.org/discover/e610cd1840de891cc3928e66b2ae49e891752c37