mirror of
https://github.com/oxen-io/session-android.git
synced 2025-12-26 05:46:43 +00:00
Fix possible de-duping issues.
- Clean bad hashes from earlier release. - Fix file equality comparison. - Given our new de-duping, we don't want to run into a situation where two simultaneous compressions could be happening on the same image.
This commit is contained in:
@@ -87,8 +87,9 @@ public class SQLCipherOpenHelper extends SQLiteOpenHelper {
|
||||
private static final int BLUR_HASH = 30;
|
||||
private static final int MMS_RECIPIENT_CLEANUP_2 = 31;
|
||||
private static final int ATTACHMENT_TRANSFORM_PROPERTIES = 32;
|
||||
private static final int ATTACHMENT_CLEAR_HASHES = 33;
|
||||
|
||||
private static final int DATABASE_VERSION = 32;
|
||||
private static final int DATABASE_VERSION = 33;
|
||||
private static final String DATABASE_NAME = "signal.db";
|
||||
|
||||
private final Context context;
|
||||
@@ -602,6 +603,10 @@ public class SQLCipherOpenHelper extends SQLiteOpenHelper {
|
||||
db.execSQL("ALTER TABLE part ADD COLUMN transform_properties TEXT DEFAULT NULL");
|
||||
}
|
||||
|
||||
if (oldVersion < ATTACHMENT_CLEAR_HASHES) {
|
||||
db.execSQL("UPDATE part SET data_hash = null");
|
||||
}
|
||||
|
||||
db.setTransactionSuccessful();
|
||||
} finally {
|
||||
db.endTransaction();
|
||||
|
||||
Reference in New Issue
Block a user