|
@@ -38,7 +38,12 @@ import android.widget.Filter;
|
|
import android.widget.ImageView;
|
|
import android.widget.ImageView;
|
|
import android.widget.LinearLayout;
|
|
import android.widget.LinearLayout;
|
|
import android.widget.TextView;
|
|
import android.widget.TextView;
|
|
-
|
|
|
|
|
|
+import androidx.annotation.NonNull;
|
|
|
|
+import androidx.core.graphics.drawable.RoundedBitmapDrawable;
|
|
|
|
+import androidx.core.graphics.drawable.RoundedBitmapDrawableFactory;
|
|
|
|
+import androidx.recyclerview.widget.RecyclerView;
|
|
|
|
+import butterknife.BindView;
|
|
|
|
+import butterknife.ButterKnife;
|
|
import com.bumptech.glide.Glide;
|
|
import com.bumptech.glide.Glide;
|
|
import com.bumptech.glide.request.target.BitmapImageViewTarget;
|
|
import com.bumptech.glide.request.target.BitmapImageViewTarget;
|
|
import com.nextcloud.client.preferences.AppPreferences;
|
|
import com.nextcloud.client.preferences.AppPreferences;
|
|
@@ -71,8 +76,6 @@ import com.owncloud.android.utils.FileStorageUtils;
|
|
import com.owncloud.android.utils.MimeTypeUtil;
|
|
import com.owncloud.android.utils.MimeTypeUtil;
|
|
import com.owncloud.android.utils.ThemeUtils;
|
|
import com.owncloud.android.utils.ThemeUtils;
|
|
|
|
|
|
-import com.nextcloud.client.preferences.PreferenceManager;
|
|
|
|
-
|
|
|
|
import java.io.File;
|
|
import java.io.File;
|
|
import java.util.ArrayList;
|
|
import java.util.ArrayList;
|
|
import java.util.HashSet;
|
|
import java.util.HashSet;
|
|
@@ -81,13 +84,6 @@ import java.util.Locale;
|
|
import java.util.Set;
|
|
import java.util.Set;
|
|
import java.util.Vector;
|
|
import java.util.Vector;
|
|
|
|
|
|
-import androidx.annotation.NonNull;
|
|
|
|
-import androidx.core.graphics.drawable.RoundedBitmapDrawable;
|
|
|
|
-import androidx.core.graphics.drawable.RoundedBitmapDrawableFactory;
|
|
|
|
-import androidx.recyclerview.widget.RecyclerView;
|
|
|
|
-import butterknife.BindView;
|
|
|
|
-import butterknife.ButterKnife;
|
|
|
|
-
|
|
|
|
/**
|
|
/**
|
|
* This Adapter populates a RecyclerView with all files and folders in a Nextcloud instance.
|
|
* This Adapter populates a RecyclerView with all files and folders in a Nextcloud instance.
|
|
*/
|
|
*/
|
|
@@ -465,8 +461,7 @@ public class OCFileListAdapter extends RecyclerView.Adapter<RecyclerView.ViewHol
|
|
file.isSharedWithSharee(), file.isSharedViaLink(), file.isEncrypted(), file.getMountType(),
|
|
file.isSharedWithSharee(), file.isSharedViaLink(), file.isEncrypted(), file.getMountType(),
|
|
mContext));
|
|
mContext));
|
|
} else {
|
|
} else {
|
|
- if ((MimeTypeUtil.isImage(file) || MimeTypeUtil.isVideo(file)) && file.getRemoteId() != null &&
|
|
|
|
- file.isPreviewAvailable()) {
|
|
|
|
|
|
+ if (file.getRemoteId() != null && file.isPreviewAvailable()) {
|
|
// Thumbnail in cache?
|
|
// Thumbnail in cache?
|
|
Bitmap thumbnail = ThumbnailsCacheManager.getBitmapFromDiskCache(
|
|
Bitmap thumbnail = ThumbnailsCacheManager.getBitmapFromDiskCache(
|
|
ThumbnailsCacheManager.PREFIX_THUMBNAIL + file.getRemoteId()
|
|
ThumbnailsCacheManager.PREFIX_THUMBNAIL + file.getRemoteId()
|