mirror of
https://github.com/oxen-io/session-android.git
synced 2025-01-12 12:33:39 +00:00
Fix crash when viewing media
This commit is contained in:
parent
fd9f1b712f
commit
8d6094ecd6
@ -659,6 +659,7 @@ public class AttachmentDatabase extends Database {
|
|||||||
|
|
||||||
return result;
|
return result;
|
||||||
} else {
|
} else {
|
||||||
|
int urlIndex = cursor.getColumnIndex(URL);
|
||||||
return Collections.singletonList(new DatabaseAttachment(new AttachmentId(cursor.getLong(cursor.getColumnIndexOrThrow(ROW_ID)),
|
return Collections.singletonList(new DatabaseAttachment(new AttachmentId(cursor.getLong(cursor.getColumnIndexOrThrow(ROW_ID)),
|
||||||
cursor.getLong(cursor.getColumnIndexOrThrow(UNIQUE_ID))),
|
cursor.getLong(cursor.getColumnIndexOrThrow(UNIQUE_ID))),
|
||||||
cursor.getLong(cursor.getColumnIndexOrThrow(MMS_ID)),
|
cursor.getLong(cursor.getColumnIndexOrThrow(MMS_ID)),
|
||||||
@ -683,7 +684,7 @@ public class AttachmentDatabase extends Database {
|
|||||||
cursor.getString(cursor.getColumnIndexOrThrow(STICKER_PACK_KEY)),
|
cursor.getString(cursor.getColumnIndexOrThrow(STICKER_PACK_KEY)),
|
||||||
cursor.getInt(cursor.getColumnIndexOrThrow(STICKER_ID)))
|
cursor.getInt(cursor.getColumnIndexOrThrow(STICKER_ID)))
|
||||||
: null,
|
: null,
|
||||||
cursor.getString(cursor.getColumnIndexOrThrow(URL))));
|
urlIndex > 0 ? cursor.getString(urlIndex) : ""));
|
||||||
}
|
}
|
||||||
} catch (JSONException e) {
|
} catch (JSONException e) {
|
||||||
throw new AssertionError(e);
|
throw new AssertionError(e);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user