mirror of
https://github.com/nextcloud/android.git
synced 2024-11-23 13:45:35 +03:00
Fixed favourites shown twice.
This commit is contained in:
parent
10034e6bf9
commit
4c1581131e
1 changed files with 12 additions and 1 deletions
|
@ -794,7 +794,18 @@ public class OCFileListAdapter extends RecyclerView.Adapter<RecyclerView.ViewHol
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!onlyMedia || MimeTypeUtil.isImage(ocFile) || MimeTypeUtil.isVideo(ocFile)) {
|
if (!onlyMedia || MimeTypeUtil.isImage(ocFile) || MimeTypeUtil.isVideo(ocFile)) {
|
||||||
mFiles.add(ocFile);
|
|
||||||
|
//handling duplicacy for favorites section
|
||||||
|
if (mFiles.isEmpty()) {
|
||||||
|
mFiles.add(ocFile);
|
||||||
|
} else {
|
||||||
|
for (OCFile file : mFiles) {
|
||||||
|
if (file.getFileId() == ocFile.getFileId()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
mFiles.add(ocFile);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ContentValues cv = new ContentValues();
|
ContentValues cv = new ContentValues();
|
||||||
|
|
Loading…
Reference in a new issue