fix(category): fix missing category when empty (#14086)
Fixes https://github.com/status-im/status-desktop/issues/14059
This commit is contained in:
parent
05df5d1bce
commit
e71d749ef2
|
@ -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 =
|
||||
|
|
Loading…
Reference in New Issue