|
@@ -186,6 +186,8 @@ public class OCFileListAdapter extends RecyclerView.Adapter<RecyclerView.ViewHol
|
|
viewThemeUtils,
|
|
viewThemeUtils,
|
|
syncedFolderProvider);
|
|
syncedFolderProvider);
|
|
|
|
|
|
|
|
+ setHasStableIds(true);
|
|
|
|
+
|
|
// initialise thumbnails cache on background thread
|
|
// initialise thumbnails cache on background thread
|
|
new ThumbnailsCacheManager.InitDiskCacheTask().execute();
|
|
new ThumbnailsCacheManager.InitDiskCacheTask().execute();
|
|
}
|
|
}
|
|
@@ -294,6 +296,7 @@ public class OCFileListAdapter extends RecyclerView.Adapter<RecyclerView.ViewHol
|
|
new Handler(Looper.getMainLooper()).post(this::notifyDataSetChanged);
|
|
new Handler(Looper.getMainLooper()).post(this::notifyDataSetChanged);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+
|
|
@Override
|
|
@Override
|
|
public long getItemId(int position) {
|
|
public long getItemId(int position) {
|
|
if (mFiles == null || mFiles.size() <= position) {
|
|
if (mFiles == null || mFiles.size() <= position) {
|
|
@@ -409,6 +412,8 @@ public class OCFileListAdapter extends RecyclerView.Adapter<RecyclerView.ViewHol
|
|
private void hideVideoFileOfLivePhoto(ListGridImageViewHolder holder, OCFile file) {
|
|
private void hideVideoFileOfLivePhoto(ListGridImageViewHolder holder, OCFile file) {
|
|
if (MimeTypeUtil.isVideo(file) && file.getLivePhoto() != null) {
|
|
if (MimeTypeUtil.isVideo(file) && file.getLivePhoto() != null) {
|
|
holder.getItemLayout().setVisibility(View.GONE);
|
|
holder.getItemLayout().setVisibility(View.GONE);
|
|
|
|
+ } else {
|
|
|
|
+ holder.getItemLayout().setVisibility(View.VISIBLE);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|