From e71d749ef2b853b229b5208b31f2cac3613b9428 Mon Sep 17 00:00:00 2001 From: Jonathan Rainville Date: Fri, 22 Mar 2024 12:55:40 -0400 Subject: [PATCH] fix(category): fix missing category when empty (#14086) Fixes https://github.com/status-im/status-desktop/issues/14059 --- src/app/modules/main/chat_section/model.nim | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/app/modules/main/chat_section/model.nim b/src/app/modules/main/chat_section/model.nim index 42445a136f..79c38991b4 100644 --- a/src/app/modules/main/chat_section/model.nim +++ b/src/app/modules/main/chat_section/model.nim @@ -84,10 +84,14 @@ QtObject: return self.items proc categoryShouldBeHiddenBecauseNotPermitted(self: Model, categoryId: string): bool = + var catHasNoChannels = true for i in 0 ..< self.items.len: if not self.items[i].isCategory and self.items[i].categoryId == categoryId: + catHasNoChannels = false if not self.items[i].hideBecausePermissionsAreNotMet(): return false + if catHasNoChannels: + return false return true proc itemShouldBeHiddenBecauseNotPermitted*(self: Model, item: Item): bool =