mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-20 16:49:40 +01:00
Update default conflict method to be 'ignore'.
This commit is contained in:
@@ -292,7 +292,7 @@ class CallTable(context: Context, databaseHelper: SignalDatabase) : DatabaseTabl
|
||||
TIMESTAMP to timestamp,
|
||||
DELETION_TIMESTAMP to System.currentTimeMillis()
|
||||
)
|
||||
.run()
|
||||
.run(SQLiteDatabase.CONFLICT_ABORT)
|
||||
|
||||
ApplicationDependencies.getDeletedCallEventManager().scheduleIfNecessary()
|
||||
}
|
||||
@@ -356,7 +356,7 @@ class CallTable(context: Context, databaseHelper: SignalDatabase) : DatabaseTabl
|
||||
TIMESTAMP to timestamp,
|
||||
RINGER to ringer
|
||||
)
|
||||
.run()
|
||||
.run(SQLiteDatabase.CONFLICT_ABORT)
|
||||
}
|
||||
|
||||
ApplicationDependencies.getDatabaseObserver().notifyCallUpdateObservers()
|
||||
@@ -462,7 +462,7 @@ class CallTable(context: Context, databaseHelper: SignalDatabase) : DatabaseTabl
|
||||
TIMESTAMP to timestamp,
|
||||
RINGER to null
|
||||
)
|
||||
.run()
|
||||
.run(SQLiteDatabase.CONFLICT_ABORT)
|
||||
|
||||
Log.d(TAG, "Inserted new call event from group call update message. Call Id: $callId")
|
||||
} else {
|
||||
@@ -670,7 +670,7 @@ class CallTable(context: Context, databaseHelper: SignalDatabase) : DatabaseTabl
|
||||
TIMESTAMP to timestamp,
|
||||
RINGER to ringerRecipient.toLong()
|
||||
)
|
||||
.run()
|
||||
.run(SQLiteDatabase.CONFLICT_ABORT)
|
||||
}
|
||||
|
||||
Log.d(TAG, "Inserted a new group ring event for $callId with event $event")
|
||||
|
||||
@@ -2725,7 +2725,7 @@ open class MessageTable(context: Context?, databaseHelper: SignalDatabase) : Dat
|
||||
READ to if (Util.isDefaultSmsProvider(context)) 0 else 1,
|
||||
SMS_SUBSCRIPTION_ID to subscriptionId
|
||||
)
|
||||
.run()
|
||||
.run(SQLiteDatabase.CONFLICT_IGNORE)
|
||||
|
||||
return Pair(messageId, threadId)
|
||||
}
|
||||
@@ -3041,6 +3041,10 @@ open class MessageTable(context: Context?, databaseHelper: SignalDatabase) : Dat
|
||||
unarchive = false
|
||||
)
|
||||
|
||||
if (messageId < 0) {
|
||||
throw MmsException("Failed to insert message! Likely a duplicate.")
|
||||
}
|
||||
|
||||
if (message.threadRecipient.isGroup) {
|
||||
val members: MutableSet<RecipientId> = mutableSetOf()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user