mirror of
https://github.com/oxen-io/session-android.git
synced 2025-12-26 21:49:30 +00:00
Add internal pre-alpha support for receiving reactions.
This commit is contained in:
committed by
Greyson Parrelli
parent
a8d826020d
commit
bceb69b284
@@ -51,7 +51,6 @@ import org.thoughtcrime.securesms.util.TextSecurePreferences;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
public class SQLCipherOpenHelper extends SQLiteOpenHelper {
|
||||
|
||||
@@ -93,8 +92,10 @@ public class SQLCipherOpenHelper extends SQLiteOpenHelper {
|
||||
private static final int ATTACHMENT_CLEAR_HASHES_2 = 34;
|
||||
private static final int UUIDS = 35;
|
||||
private static final int USERNAMES = 36;
|
||||
private static final int REACTIONS = 37;
|
||||
|
||||
private static final int DATABASE_VERSION = 37;
|
||||
|
||||
private static final int DATABASE_VERSION = 36;
|
||||
private static final String DATABASE_NAME = "signal.db";
|
||||
|
||||
private final Context context;
|
||||
@@ -626,6 +627,17 @@ public class SQLCipherOpenHelper extends SQLiteOpenHelper {
|
||||
db.execSQL("CREATE UNIQUE INDEX IF NOT EXISTS recipient_username_index ON recipient (username)");
|
||||
}
|
||||
|
||||
if (oldVersion < REACTIONS) {
|
||||
db.execSQL("ALTER TABLE sms ADD COLUMN reactions BLOB DEFAULT NULL");
|
||||
db.execSQL("ALTER TABLE mms ADD COLUMN reactions BLOB DEFAULT NULL");
|
||||
|
||||
db.execSQL("ALTER TABLE sms ADD COLUMN reactions_unread INTEGER DEFAULT 0");
|
||||
db.execSQL("ALTER TABLE mms ADD COLUMN reactions_unread INTEGER DEFAULT 0");
|
||||
|
||||
db.execSQL("ALTER TABLE sms ADD COLUMN reactions_last_seen INTEGER DEFAULT -1");
|
||||
db.execSQL("ALTER TABLE mms ADD COLUMN reactions_last_seen INTEGER DEFAULT -1");
|
||||
}
|
||||
|
||||
db.setTransactionSuccessful();
|
||||
} finally {
|
||||
db.endTransaction();
|
||||
|
||||
Reference in New Issue
Block a user