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
|
return self.items
|
||||||
|
|
||||||
proc categoryShouldBeHiddenBecauseNotPermitted(self: Model, categoryId: string): bool =
|
proc categoryShouldBeHiddenBecauseNotPermitted(self: Model, categoryId: string): bool =
|
||||||
|
var catHasNoChannels = true
|
||||||
for i in 0 ..< self.items.len:
|
for i in 0 ..< self.items.len:
|
||||||
if not self.items[i].isCategory and self.items[i].categoryId == categoryId:
|
if not self.items[i].isCategory and self.items[i].categoryId == categoryId:
|
||||||
|
catHasNoChannels = false
|
||||||
if not self.items[i].hideBecausePermissionsAreNotMet():
|
if not self.items[i].hideBecausePermissionsAreNotMet():
|
||||||
return false
|
return false
|
||||||
|
if catHasNoChannels:
|
||||||
|
return false
|
||||||
return true
|
return true
|
||||||
|
|
||||||
proc itemShouldBeHiddenBecauseNotPermitted*(self: Model, item: Item): bool =
|
proc itemShouldBeHiddenBecauseNotPermitted*(self: Model, item: Item): bool =
|
||||||
|
|
Loading…
Reference in New Issue