Open tobiasKaminsky opened 4 years ago
But there are multiple instances (see screenshot) of
UploadsStorageManager
so it doesn't work anyway.
This should per se be no problem, as all queries are against a database, which synchronizes it. I guess that we just do not have a callback (or obsverable, as you said) to detect that we have to reload the list.
Registering a ContentObserver
on the database means we have to unregister it once we're done with the instance of UploadsStorageManager
. A new instance of this almost every time an activity is opened (and more), this gets hard to be tracked.
Making this a singleton (should be fine) means that there's only one ContentObserver
on the db.
Anyway UploadListAdapter has to either:
UploadMessagesReceiver
)See #5488 for 1st solution
This is a display bug, if you refresh up to date list is displayed.
FileDownloader L645
andUploadsStorageManager L238
-> UploadListAdapter doesn't register as an Observer ofUploadsStorageManager
. But there are multiple instances (see screenshot) ofUploadsStorageManager
so it doesn't work anyway. I need your help @tobiasKaminsky on how you would make this class an effective singleton; else there is no way to properly update the view.@tobiasKaminsky up on my answers to your comments btw.
Originally posted by @ArisuOngaku in https://github.com/nextcloud/android/pull/4788#issuecomment-586173105