File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
app/src/main/java/org/thoughtcrime/securesms Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -154,7 +154,7 @@ class ConfigToDatabaseSync @Inject constructor(
154
154
155
155
// Initiate cleanup in recipient_settings rows that no longer have any messages
156
156
val addressesToKeep = mmsSmsDatabase.getAllReferencedAddresses()
157
- .mapTo(mutableSetOf ()) { Address . fromSerialized(it) }
157
+ .mapTo(mutableSetOf ()) { fromSerialized(it) }
158
158
159
159
val removed = recipientSettingsDatabase.cleanupRecipientSettings(addressesToKeep)
160
160
Log .d(TAG , " Recipient settings pruned: $removed orphan rows" )
Original file line number Diff line number Diff line change @@ -151,10 +151,10 @@ class RecipientSettingsDatabase @Inject constructor(
151
151
* them from the cleanup.
152
152
*/
153
153
fun getAllReferencedAvatarFiles (): Set <RemoteFile .Encrypted > {
154
- val recipientAvatars = LinkedHashSet <RemoteFile .Encrypted >()
154
+ val recipientAvatars = HashSet <RemoteFile .Encrypted >()
155
155
readableDatabase.rawQuery(
156
156
"""
157
- SELECT $COL_PROFILE_PIC_URL , $COL_PROFILE_PIC_KEY
157
+ SELECT DISTINCT $COL_PROFILE_PIC_URL , $COL_PROFILE_PIC_KEY
158
158
FROM $TABLE_NAME
159
159
WHERE $COL_PROFILE_PIC_URL IS NOT NULL AND $COL_PROFILE_PIC_URL != ''
160
160
AND $COL_PROFILE_PIC_KEY IS NOT NULL AND $COL_PROFILE_PIC_KEY != ''
You can’t perform that action at this time.
0 commit comments