mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-30 13:47:05 +02:00
Cloud sync: last modification improvements
This commit is contained in:
@@ -489,7 +489,7 @@ public abstract class DB extends RoomDatabase {
|
||||
Log.i("Get PRAGMA " + pragma + "=<?>");
|
||||
}
|
||||
|
||||
if (BuildConfig.DEBUG && false) {
|
||||
if (BuildConfig.DEBUG) {
|
||||
db.execSQL("DROP TRIGGER IF EXISTS `attachment_insert`");
|
||||
db.execSQL("DROP TRIGGER IF EXISTS `attachment_delete`");
|
||||
|
||||
@@ -561,14 +561,16 @@ public abstract class DB extends RoomDatabase {
|
||||
" AFTER UPDATE ON account" +
|
||||
" BEGIN" +
|
||||
" UPDATE account SET last_modified = strftime('%s') * 1000" +
|
||||
" WHERE (NEW.auth_type = " + AUTH_TYPE_PASSWORD + " OR OLD.password = NEW.password);" +
|
||||
" WHERE id = NEW.id" +
|
||||
" AND (NEW.auth_type = " + AUTH_TYPE_PASSWORD + " OR OLD.password = NEW.password);" +
|
||||
" END");
|
||||
|
||||
db.execSQL("CREATE TRIGGER IF NOT EXISTS identity_update" +
|
||||
" AFTER UPDATE ON identity" +
|
||||
" BEGIN" +
|
||||
" UPDATE identity SET last_modified = strftime('%s') * 1000" +
|
||||
" WHERE (NEW.auth_type = " + AUTH_TYPE_PASSWORD + " OR OLD.password = NEW.password);" +
|
||||
" WHERE id = NEW.id" +
|
||||
" AND (NEW.auth_type = " + AUTH_TYPE_PASSWORD + " OR OLD.password = NEW.password);" +
|
||||
" END");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user