fix(community): update hidden channels visibility when joining the community

fixes #14719
This commit is contained in:
Andrey Bocharnikov 2024-06-14 15:39:17 +04:00
parent 774c08eec7
commit f118af8403
2 changed files with 11 additions and 1 deletions

View File

@ -298,7 +298,15 @@ Component {
text: "Note: 'applicationWindow' is good root object in" text: "Note: 'applicationWindow' is good root object in"
+ " most cases. 'WalletStores.RootStore' and" + " most cases. 'WalletStores.RootStore' and"
+ " `SharedStores.RootStore` are also exposed for" + " `SharedStores.RootStore` are also exposed for"
+ " convenience for models created within those singletons." + " convenience for models created within those singletons. \n\n"
+ " Hack (see #15181): If you want to inspect a model that is not"
+ " from the root object (under a repeater), add objectName to a dummy object in AppMain.qml: \n"
+ " property var modelIWantToInspect: SortFilterProxyModel { \n"
+ " objectName: \"YYY\" \n"
+ " } \n"
+ " and inside your item add something like this: \n"
+ " Component.onCompleted: appMain.modelIWantToInspect.sourceModel = this.model \n"
+ " Then you can use 'YYY' as the object name in this search."
} }
RowLayout { RowLayout {

View File

@ -428,6 +428,8 @@ QtObject:
let modelIndex = self.createIndex(index, 0, nil) let modelIndex = self.createIndex(index, 0, nil)
defer: modelIndex.delete defer: modelIndex.delete
changedRoles.add(ModelRole.HideIfPermissionsNotMet.int) # depends on canPost, canView
changedRoles.add(ModelRole.ShouldBeHiddenBecausePermissionsAreNotMet.int) # depends on hideIfPermissionsNotMet
self.dataChanged(modelIndex, modelIndex, changedRoles) self.dataChanged(modelIndex, modelIndex, changedRoles)
proc changeMutedOnItemByCategoryId*(self: Model, categoryId: string, muted: bool) = proc changeMutedOnItemByCategoryId*(self: Model, categoryId: string, muted: bool) =