build: trying to track down broken retrieve avatar job

This commit is contained in:
0x330a
2023-06-22 15:16:44 +10:00
parent 05f8dc6d43
commit 8d0f946791
3 changed files with 6 additions and 10 deletions

View File

@@ -549,15 +549,8 @@ open class Storage(context: Context, helper: SQLCipherOpenHelper, private val co
for (groupInfo in communities) {
val groupBaseCommunity = groupInfo.community
if (groupBaseCommunity.fullUrl() !in existingJoinUrls) {
if (groupBaseCommunity.fullUrl() in existingJoinUrls) {
// add it
try {
val (threadId, _) = OpenGroupManager.add(groupBaseCommunity.baseUrl, groupBaseCommunity.room, groupBaseCommunity.pubKeyHex, context)
threadDb.setPinned(threadId, groupInfo.priority == PRIORITY_PINNED)
} catch (e: Exception) {
Log.e("Loki", "Failed to get Open Group Info on syncing config",e)
}
} else {
val (threadId, _) = existingCommunities.entries.first { (_, v) -> v.joinURL == groupInfo.community.fullUrl() }
threadDb.setPinned(threadId, groupInfo.priority == PRIORITY_PINNED)
}