mirror of
https://github.com/nextcloud/android.git
synced 2024-11-26 23:28:42 +03:00
Attempt to fix duplicate entries
This commit is contained in:
parent
7f28c35b34
commit
4068eb5499
2 changed files with 3 additions and 5 deletions
|
@ -134,13 +134,11 @@ public class MainApp extends Application {
|
|||
}
|
||||
|
||||
for (Pair<Long, Boolean> pair : syncedFolders.values()) {
|
||||
if (pair.second) {
|
||||
ids.add(pair.first);
|
||||
}
|
||||
ids.add(pair.first);
|
||||
}
|
||||
|
||||
for (SyncedFolder syncedFolder : syncedFolderList) {
|
||||
if (ids.contains(syncedFolder.getId())) {
|
||||
if (!ids.contains(syncedFolder.getId())) {
|
||||
syncedFolderArrayList.add(syncedFolder);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -193,7 +193,7 @@ public class SyncedFolderProvider extends Observable {
|
|||
|
||||
int result = mContentResolver.delete(
|
||||
ProviderMeta.ProviderTableMeta.CONTENT_URI_SYNCED_FOLDERS,
|
||||
ProviderMeta.ProviderTableMeta._ID + " IN (?)",
|
||||
ProviderMeta.ProviderTableMeta._ID + " NOT IN (?)",
|
||||
new String[]{String.valueOf(ids)}
|
||||
);
|
||||
|
||||
|
|
Loading…
Reference in a new issue