diff --git a/app/src/main/java/org/thoughtcrime/securesms/mediapreview/MediaPreviewViewModel.java b/app/src/main/java/org/thoughtcrime/securesms/mediapreview/MediaPreviewViewModel.java index 259579a59c..91dad13848 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/mediapreview/MediaPreviewViewModel.java +++ b/app/src/main/java/org/thoughtcrime/securesms/mediapreview/MediaPreviewViewModel.java @@ -28,7 +28,7 @@ public class MediaPreviewViewModel extends ViewModel { public void setCursor(@NonNull Context context, @Nullable Cursor cursor, boolean leftIsRecent) { boolean firstLoad = (this.cursor == null) && (cursor != null); - if (this.cursor != null) { + if (this.cursor != null && !this.cursor.equals(cursor)) { this.cursor.close(); } this.cursor = cursor;