mirror of
https://github.com/nextcloud/android.git
synced 2024-11-28 10:18:59 +03:00
Merge pull request #6999 from nextcloud/shimmerOnlyOnMedia
Do not show shimmer on folders
This commit is contained in:
commit
f1e7a58767
1 changed files with 5 additions and 2 deletions
|
@ -646,6 +646,7 @@ public class OCFileListAdapter extends RecyclerView.Adapter<RecyclerView.ViewHol
|
|||
LoaderImageView shimmerThumbnail,
|
||||
AppPreferences preferences) {
|
||||
if (file.isFolder()) {
|
||||
stopShimmer(shimmerThumbnail, thumbnailView);
|
||||
thumbnailView.setImageDrawable(MimeTypeUtil
|
||||
.getFolderTypeIcon(file.isSharedWithMe() || file.isSharedWithSharee(),
|
||||
file.isSharedViaLink(), file.isEncrypted(),
|
||||
|
@ -727,6 +728,7 @@ public class OCFileListAdapter extends RecyclerView.Adapter<RecyclerView.ViewHol
|
|||
thumbnailView.setBackgroundColor(context.getResources().getColor(R.color.bg_default));
|
||||
}
|
||||
} else {
|
||||
stopShimmer(shimmerThumbnail, thumbnailView);
|
||||
thumbnailView.setImageDrawable(MimeTypeUtil.getFileTypeIcon(file.getMimeType(),
|
||||
file.getFileName(),
|
||||
user,
|
||||
|
@ -784,10 +786,11 @@ public class OCFileListAdapter extends RecyclerView.Adapter<RecyclerView.ViewHol
|
|||
}
|
||||
|
||||
private static void stopShimmer(@Nullable LoaderImageView thumbnailShimmer, ImageView thumbnailView) {
|
||||
if (thumbnailShimmer != null){
|
||||
if (thumbnailShimmer != null) {
|
||||
thumbnailShimmer.setVisibility(View.GONE);
|
||||
thumbnailView.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
thumbnailView.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
private String getFooterText() {
|
||||
|
|
Loading…
Reference in a new issue