mirror of
https://github.com/oxen-io/session-android.git
synced 2023-12-14 02:53:01 +01:00
don't close the cursor if it's the same that is in the parameters
This commit is contained in:
parent
de45ec584d
commit
9af804ec21
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue