Batch insert group receipts.

This commit is contained in:
Nicholas
2023-11-08 09:52:37 -05:00
committed by Cody Henthorne
parent 29c70acf4e
commit 39fbbe896f

View File

@@ -59,8 +59,8 @@ class GroupReceiptTable(context: Context?, databaseHelper: SignalDatabase?) : Da
}
val statements = SqlUtil.buildBulkInsert(TABLE_NAME, arrayOf(MMS_ID, RECIPIENT_ID, STATUS, TIMESTAMP), contentValues)
for (statement in statements) {
writableDatabase.execSQL(statement.where, statement.whereArgs)
writableDatabase.withinTransaction { db ->
statements.forEach { db.execSQL(it.where, it.whereArgs) }
}
}