File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
app/src/main/java/org/thoughtcrime/securesms/database Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -195,7 +195,7 @@ class RecipientSettingsDatabase @Inject constructor(
195
195
fun cleanupRecipientSettings (addressesToKeep : Set <Address >): Int {
196
196
if (addressesToKeep.isEmpty()) return 0
197
197
198
- // Build a temporary lookup of strings for SQL bind args
198
+ // Build a temporary lookup of strings
199
199
val keepSet = addressesToKeep.mapTo(hashSetOf()) { it.toString() }
200
200
201
201
// Collect all rows, figure out orphans in memory
@@ -205,11 +205,11 @@ class RecipientSettingsDatabase @Inject constructor(
205
205
if (orphans.isEmpty()) return 0
206
206
207
207
var deleted = 0
208
- val db = writableDatabase
209
- db .beginTransaction()
208
+ val database = writableDatabase
209
+ database .beginTransaction()
210
210
try {
211
211
for (address in orphans) {
212
- val rows = db .delete(
212
+ val rows = database .delete(
213
213
TABLE_NAME ,
214
214
" $COL_ADDRESS = ?" ,
215
215
arrayOf(address.toString())
@@ -220,9 +220,9 @@ class RecipientSettingsDatabase @Inject constructor(
220
220
deleted + = rows
221
221
}
222
222
}
223
- db .setTransactionSuccessful()
223
+ database .setTransactionSuccessful()
224
224
} finally {
225
- db .endTransaction()
225
+ database .endTransaction()
226
226
}
227
227
return deleted
228
228
}
You can’t perform that action at this time.
0 commit comments