mirror of
https://github.com/oxen-io/session-android.git
synced 2025-12-26 08:56:46 +00:00
Populate incoming attachments with width and height from message
This commit is contained in:
@@ -42,8 +42,9 @@ public class SQLCipherOpenHelper extends SQLiteOpenHelper {
|
||||
private static final int MIGRATE_PREKEYS_VERSION = 3;
|
||||
private static final int MIGRATE_SESSIONS_VERSION = 4;
|
||||
private static final int NO_MORE_IMAGE_THUMBNAILS_VERSION = 5;
|
||||
private static final int ATTACHMENT_DIMENSIONS = 6;
|
||||
|
||||
private static final int DATABASE_VERSION = 4;
|
||||
private static final int DATABASE_VERSION = 6;
|
||||
private static final String DATABASE_NAME = "signal.db";
|
||||
|
||||
private final Context context;
|
||||
@@ -161,6 +162,11 @@ public class SQLCipherOpenHelper extends SQLiteOpenHelper {
|
||||
}
|
||||
}
|
||||
|
||||
if (oldVersion < ATTACHMENT_DIMENSIONS) {
|
||||
db.execSQL("ALTER TABLE part ADD COLUMN width INTEGER DEFAULT 0");
|
||||
db.execSQL("ALTER TABLE part ADD COLUMN height INTEGER DEFAULT 0");
|
||||
}
|
||||
|
||||
db.setTransactionSuccessful();
|
||||
} finally {
|
||||
db.endTransaction();
|
||||
|
||||
Reference in New Issue
Block a user