mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-24 16:57:50 +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;
|
||||
} else {
|
||||
int urlIndex = cursor.getColumnIndex(URL);
|
||||
return Collections.singletonList(new DatabaseAttachment(new AttachmentId(cursor.getLong(cursor.getColumnIndexOrThrow(ROW_ID)),
|
||||
cursor.getLong(cursor.getColumnIndexOrThrow(UNIQUE_ID))),
|
||||
cursor.getLong(cursor.getColumnIndexOrThrow(MMS_ID)),
|
||||
@ -683,7 +684,7 @@ public class AttachmentDatabase extends Database {
|
||||
cursor.getString(cursor.getColumnIndexOrThrow(STICKER_PACK_KEY)),
|
||||
cursor.getInt(cursor.getColumnIndexOrThrow(STICKER_ID)))
|
||||
: null,
|
||||
cursor.getString(cursor.getColumnIndexOrThrow(URL))));
|
||||
urlIndex > 0 ? cursor.getString(urlIndex) : ""));
|
||||
}
|
||||
} catch (JSONException e) {
|
||||
throw new AssertionError(e);
|
||||
|
Loading…
x
Reference in New Issue
Block a user