desktop
desktop copied to clipboard
Refactor ActivityListModel population mechanisms
Signed-off-by: Claudio Cambra [email protected]
As it stands, the ActivityListModel
has two issues:
- It updates coarsely, bulldozing all prior data and replacing with newly-acquired data
- It has duplicated and messy code relating to inserting and removing rows from the model
This refactoring eliminates these issues, which in turn also prevents the activity list view resetting every time something changes (i.e. receiving new activities, dismissing notifications, etc.) by updating the core data list granularly rather than coarsely. This addresses a point in #4432
NOTE: this PR depends on #4735 as it removes the clearNotifications
method which goes unused after the internal refactoring of ActivityListModel
and the removal of clearNotifications
from the UserModel
in #4735
Fixes #4724
Codecov Report
Merging #4736 (20c5f8e) into master (20c5f8e) will not change coverage. The diff coverage is
n/a
.
:exclamation: Current head 20c5f8e differs from pull request most recent head 1a5fa50. Consider uploading reports for the commit 1a5fa50 to get more accurate results
Additional details and impacted files
@@ Coverage Diff @@
## master #4736 +/- ##
=======================================
Coverage 57.20% 57.20%
=======================================
Files 138 138
Lines 17138 17138
=======================================
Hits 9804 9804
Misses 7334 7334
/backport to stable-3.5
/backport to stable-3.5
I would prefer not to backport in case that would induce regressions
It updates coarsely, bulldozing all prior data and replacing with newly-acquired data
Ahh nice, so this also fixes the issue of old Talk notifications which were already seen via other apps still showing up? :)
It updates coarsely, bulldozing all prior data and replacing with newly-acquired data
Ahh nice, so this also fixes the issue of old Talk notifications which were already seen via other apps still showing up? :)
Not really; as I know we do not receive a list of completed notifications from the server which would let us filter out notifications from our presently-shown notifications. But this should prevent showing duplicates
@claucambra Just, please don't forget to fix the build
AppImage file: nextcloud-PR-4736-1a5fa50fbbfb006232fcc9d92733cdf2e9573056-x86_64.AppImage
To test this change/fix you can simply download above AppImage file and test it.
Please make sure to quit your existing Nextcloud app and backup your data.