nextcloud / nextcloud/android

Multiple instances of UploadsStorageManager

Open
#5,487 2 comments 0 reactions 0 assignees View on GitHub
approved bug feature: auto upload hotspot: sync conflicts needs review pr exists
Dominant language
Kotlin
Stars
5.6k
Forks
2k
Avg merge
2d 18h
Merged PRs (30d)
92

Description

> Bug:
>
> * have 3 images in Camera
> * upload them
> * install this branch
> * enable "upload previously"
> * enable upload for folder "Camera"
> * see that three items as conflict in upload list view +1
> * click on one, select "keep server"
> * still see three items
> --> it should be two

This is a display bug, if you refresh up to date list is displayed.

`FileDownloader L645` and `UploadsStorageManager L238` -> UploadListAdapter doesn't register as an Observer of `UploadsStorageManager`. But there are multiple instances (see screenshot) of `UploadsStorageManager` 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.

![image](https://user-images.githubusercontent.com/35401485/74518393-0af52680-4f14-11ea-9dd5-58680e34c4b1.png)

@tobiasKaminsky up on my answers to your comments btw.

_Originally posted by @ArisuOngaku in https://github.com/nextcloud/android/pull/4788#issuecomment-586173105_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.