diff --git a/src/app_service/service/community/dto/community.nim b/src/app_service/service/community/dto/community.nim index 52877ba0d7..01c92628b6 100644 --- a/src/app_service/service/community/dto/community.nim +++ b/src/app_service/service/community/dto/community.nim @@ -503,13 +503,13 @@ proc parseCommunities*(response: JsonNode, categories: seq[Category]): seq[Commu for category in categories: categoryMap[category.id] = true - result = newSeq[CommunityDto]() for communityNode in response["result"].getElems(): var community = communityNode.toCommunityDto() + for category in community.categories.mitems: if categoryMap.hasKey(category.id): category.categoryOpened = true - result.add(community) + result.add(community) proc parseKnownCuratedCommunities(jsonCommunities: JsonNode): seq[CommunityDto] = for _, communityJson in jsonCommunities.pairs(): diff --git a/src/app_service/service/community/service.nim b/src/app_service/service/community/service.nim index 2884a68f10..c0edc0d2f7 100644 --- a/src/app_service/service/community/service.nim +++ b/src/app_service/service/community/service.nim @@ -423,11 +423,6 @@ QtObject: # but implement a solution for individual updates self.events.emit(SIGNAL_COMMUNITY_HISTORY_ARCHIVES_DOWNLOAD_FINISHED, CommunityIdArgs(communityId: receivedData.communityId)) - proc findChatById(id: string, chats: seq[ChatDto]): ChatDto = - for chat in chats: - if(chat.id == id): - return chat - proc findIndexById(id: string, chats: seq[ChatDto]): int = var idx = -1 for chat in chats: