From 865b3385f36a81b9174f5276b67d64bb9f6f825c Mon Sep 17 00:00:00 2001 From: Pascal Precht Date: Wed, 21 Jul 2021 12:28:56 +0200 Subject: [PATCH] fix(CreateCategoryPopup): ensure channels are rendered in edit mode Fixes #2984 --- .../Chat/CommunityComponents/CreateCategoryPopup.qml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ui/app/AppLayouts/Chat/CommunityComponents/CreateCategoryPopup.qml b/ui/app/AppLayouts/Chat/CommunityComponents/CreateCategoryPopup.qml index b84a69f7e4..5ee9718d01 100644 --- a/ui/app/AppLayouts/Chat/CommunityComponents/CreateCategoryPopup.qml +++ b/ui/app/AppLayouts/Chat/CommunityComponents/CreateCategoryPopup.qml @@ -128,7 +128,7 @@ StatusModal { anchors.horizontalCenter: parent.horizontalCenter width: parent.width - 32 visible: popup.isEdit ? - model.category === popup.categoryId || model.categoryId === "" : + model.categoryId === popup.categoryId || model.categoryId === "" : model.categoryId === "" title: "#" + model.name @@ -139,16 +139,16 @@ StatusModal { components: [ StatusCheckBox { id: channelItemCheckbox - checked: popup.isEdit ? channels.indexOf(model.id) > - 1 : false + checked: popup.isEdit ? popup.channels.indexOf(model.id) > - 1 : false onCheckedChanged: { - var idx = channels.indexOf(model.id) + var idx = popup.channels.indexOf(model.id) if(checked){ if(idx === -1){ - channels.push(model.id) + popup.channels.push(model.id) } } else { if(idx > -1){ - channels.splice(idx, 1); + popup.channels.splice(idx, 1); } } }