chore: extra missed existing group

This commit is contained in:
0x330a
2023-03-08 10:22:08 +11:00
parent 338de329ed
commit 3642aaa511

View File

@@ -410,10 +410,13 @@ class Storage(context: Context, helper: SQLCipherOpenHelper, private val configF
for (group in lgc) {
if (group !is GroupInfo.LegacyGroupInfo) continue
val existingGroup = existingClosedGroups.firstOrNull { GroupUtil.doubleDecodeGroupId(it.encodedId) == group.sessionId }
val existingThread = existingGroup?.let { getThreadId(existingGroup.encodedId) }
if (existingGroup != null) {
Log.d("Loki-DBG", "Existing closed group, don't add")
if (group.hidden) {
threadDb.setThreadArchived(existingGroup.)
if (group.hidden && existingThread != null) {
threadDb.setThreadArchived(existingThread)
} else if (existingThread == null) {
Log.w("Loki-DBG", "Existing group had no thread to hide")
}
} else {
val members = group.members.keys.map { Address.fromSerialized(it) }