Skip to content

Commit

Permalink
fix(@desktop/community): membership request button disappears when a …
Browse files Browse the repository at this point in the history
…category is edited
  • Loading branch information
mprakhov committed Apr 11, 2023
1 parent fe64d0e commit f5a7442
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/app_service/service/community/service.nim
Original file line number Diff line number Diff line change
Expand Up @@ -1244,12 +1244,13 @@ QtObject:
chats.add(chatDetails)

# Update communities objects
let updatedCommunity = response.result["communities"][0].toCommunityDto
var updatedCommunity = response.result["communities"][0].toCommunityDto
self.checkForCategoryPropertyUpdates(
updatedCommunity,
self.communities[communityId]
)
self.communities[communityId] = updatedCommunity

self.saveUpdatedCommunity(updatedCommunity)

for k, v in response.result["communityChanges"].getElems()[0]["categoriesModified"].pairs():
let category = v.toCategory()
Expand All @@ -1268,13 +1269,14 @@ QtObject:
raise newException(RpcException, "Error deleting community category: " & error.message)

# Update communities objects
let updatedCommunity = response.result["communities"][0].toCommunityDto
var updatedCommunity = response.result["communities"][0].toCommunityDto

self.checkForCategoryPropertyUpdates(
updatedCommunity,
self.communities[communityId]
)
self.communities[communityId] = updatedCommunity

self.saveUpdatedCommunity(updatedCommunity)

self.events.emit(SIGNAL_COMMUNITY_CATEGORY_DELETED,
CommunityCategoryArgs(
Expand Down

0 comments on commit f5a7442

Please # to comment.