mirror of
https://github.com/nextcloud/android.git
synced 2024-11-23 21:55:48 +03:00
properly display multiple configurations for a single folder (image/video/custom)
This commit is contained in:
parent
68622733a1
commit
72d2374f8a
1 changed files with 9 additions and 6 deletions
|
@ -234,10 +234,14 @@ public class FolderSyncActivity extends FileActivity implements FolderSyncAdapte
|
||||||
List<SyncedFolderDisplayItem> result = new ArrayList<>();
|
List<SyncedFolderDisplayItem> result = new ArrayList<>();
|
||||||
|
|
||||||
for (MediaFolder mediaFolder : mediaFolders) {
|
for (MediaFolder mediaFolder : mediaFolders) {
|
||||||
if (syncedFoldersMap.containsKey(mediaFolder.absolutePath)) {
|
if (syncedFoldersMap.containsKey(mediaFolder.absolutePath+"-"+mediaFolder.type)) {
|
||||||
SyncedFolder syncedFolder = syncedFoldersMap.get(mediaFolder.absolutePath);
|
SyncedFolder syncedFolder = syncedFoldersMap.get(mediaFolder.absolutePath+"-"+mediaFolder.type);
|
||||||
syncedFoldersMap.remove(mediaFolder.absolutePath);
|
syncedFoldersMap.remove(mediaFolder.absolutePath);
|
||||||
|
if (MediaFolder.CUSTOM == syncedFolder.getType()) {
|
||||||
|
result.add(createSyncedFolderWithoutMediaFolder(syncedFolder));
|
||||||
|
} else {
|
||||||
result.add(createSyncedFolder(syncedFolder, mediaFolder));
|
result.add(createSyncedFolder(syncedFolder, mediaFolder));
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
result.add(createSyncedFolderFromMediaFolder(mediaFolder));
|
result.add(createSyncedFolderFromMediaFolder(mediaFolder));
|
||||||
}
|
}
|
||||||
|
@ -245,8 +249,7 @@ public class FolderSyncActivity extends FileActivity implements FolderSyncAdapte
|
||||||
|
|
||||||
// No media folder and thus always a custom folder
|
// No media folder and thus always a custom folder
|
||||||
for (SyncedFolder syncedFolder : syncedFoldersMap.values()) {
|
for (SyncedFolder syncedFolder : syncedFoldersMap.values()) {
|
||||||
SyncedFolderDisplayItem syncedFolderDisplayItem = createSyncedFolderWithoutMediaFolder(syncedFolder);
|
result.add(createSyncedFolderWithoutMediaFolder(syncedFolder));
|
||||||
result.add(syncedFolderDisplayItem);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
@ -405,7 +408,7 @@ public class FolderSyncActivity extends FileActivity implements FolderSyncAdapte
|
||||||
Map<String, SyncedFolder> result = new HashMap<>();
|
Map<String, SyncedFolder> result = new HashMap<>();
|
||||||
if (syncFolders != null) {
|
if (syncFolders != null) {
|
||||||
for (SyncedFolder syncFolder : syncFolders) {
|
for (SyncedFolder syncFolder : syncFolders) {
|
||||||
result.put(syncFolder.getLocalPath(), syncFolder);
|
result.put(syncFolder.getLocalPath()+"-"+syncFolder.getType(), syncFolder);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
|
|
Loading…
Reference in a new issue