Browse Source

As soon as we have a thumbnail we should stop shimmer.
This happens when a thumbnail is available, but one scrolls and then come back to the thumbnail, as image view is recycled

Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>

tobiasKaminsky 4 years ago
parent
commit
58591832c8

+ 2 - 0
src/main/java/com/owncloud/android/ui/adapter/OCFileListAdapter.java

@@ -659,6 +659,8 @@ public class OCFileListAdapter extends RecyclerView.Adapter<RecyclerView.ViewHol
                 );
 
                 if (thumbnail != null && !file.isUpdateThumbnailNeeded()) {
+                    stopShimmer(shimmerThumbnail, thumbnailView);
+
                     if (MimeTypeUtil.isVideo(file)) {
                         Bitmap withOverlay = ThumbnailsCacheManager.addVideoOverlay(thumbnail);
                         thumbnailView.setImageBitmap(withOverlay);