From 62c48a0072689183bf5231e36ddecd12f0e4bc63 Mon Sep 17 00:00:00 2001 From: Michal Iskierko Date: Mon, 8 Apr 2024 00:00:16 +0200 Subject: [PATCH] chore(desktop): upgrade status-go Issue #14044 --- src/app/modules/main/profile_section/contacts/module.nim | 4 ++-- src/app/modules/main/profile_section/contacts/view.nim | 4 ++-- .../Profile/helpers/ProfileShowcaseModelAdapter.qml | 5 +++++ .../Profile/helpers/ProfileShowcaseSettingsModelAdapter.qml | 4 ++++ ui/app/AppLayouts/Profile/stores/ContactsStore.qml | 2 ++ ui/app/AppLayouts/Profile/stores/ProfileSectionStore.qml | 1 + .../shared/views/profile/ProfileShowcaseCommunitiesView.qml | 2 +- 7 files changed, 17 insertions(+), 5 deletions(-) diff --git a/src/app/modules/main/profile_section/contacts/module.nim b/src/app/modules/main/profile_section/contacts/module.nim index 1417cff846..65b86903fe 100644 --- a/src/app/modules/main/profile_section/contacts/module.nim +++ b/src/app/modules/main/profile_section/contacts/module.nim @@ -338,9 +338,9 @@ method requestProfileShowcase*(self: Module, publicKey: string) = if self.showcasePublicKey != publicKey: self.view.clearShowcaseModels() self.showcasePublicKey = publicKey - self.showcaseForAContactLoading = true - self.view.emitShowcaseForAContactLoadingChangedSignal() + self.showcaseForAContactLoading = true + self.view.emitShowcaseForAContactLoadingChangedSignal() self.controller.requestProfileShowcaseForContact(publicKey, false) method onProfileShowcaseUpdated(self: Module, publicKey: string) = diff --git a/src/app/modules/main/profile_section/contacts/view.nim b/src/app/modules/main/profile_section/contacts/view.nim index 8b67f2ef70..b56f188e22 100644 --- a/src/app/modules/main/profile_section/contacts/view.nim +++ b/src/app/modules/main/profile_section/contacts/view.nim @@ -278,9 +278,9 @@ QtObject: proc showcaseForAContactLoadingChanged*(self: View) {.signal.} proc emitShowcaseForAContactLoadingChangedSignal*(self: View) = self.showcaseForAContactLoadingChanged() - proc isShowcaseForAContactLoading*(self: View): bool {.signal.} = + proc isShowcaseForAContactLoading*(self: View): bool {.slot.} = return self.delegate.isShowcaseForAContactLoading() - QtProperty[QVariant] showcaseForAContactLoading: + QtProperty[bool] showcaseForAContactLoading: read = isShowcaseForAContactLoading notify = showcaseForAContactLoadingChanged diff --git a/ui/app/AppLayouts/Profile/helpers/ProfileShowcaseModelAdapter.qml b/ui/app/AppLayouts/Profile/helpers/ProfileShowcaseModelAdapter.qml index a479b14640..0354fe5bce 100644 --- a/ui/app/AppLayouts/Profile/helpers/ProfileShowcaseModelAdapter.qml +++ b/ui/app/AppLayouts/Profile/helpers/ProfileShowcaseModelAdapter.qml @@ -26,6 +26,7 @@ QObject { //helpers property var isAddressSaved: (address) => false + property bool isShowcaseLoading: false // Collectibles input models property alias collectiblesSourceModel: collectiblesSFPM.sourceModel @@ -65,6 +66,10 @@ QObject { function getShowcaseVisibility() { return Constants.ShowcaseVisibility.Everyone } + }, + FastExpressionRole { + name: "isShowcaseLoading" + expression: root.isShowcaseLoading } ] } diff --git a/ui/app/AppLayouts/Profile/helpers/ProfileShowcaseSettingsModelAdapter.qml b/ui/app/AppLayouts/Profile/helpers/ProfileShowcaseSettingsModelAdapter.qml index 1237d5eb51..fc9dbf9742 100644 --- a/ui/app/AppLayouts/Profile/helpers/ProfileShowcaseSettingsModelAdapter.qml +++ b/ui/app/AppLayouts/Profile/helpers/ProfileShowcaseSettingsModelAdapter.qml @@ -57,6 +57,10 @@ QObject { name: "membersCount" expression: model.members.count expectedRoles: ["members"] + }, + FastExpressionRole { + name: "isShowcaseLoading" + expression: false } ] filters: ValueFilter { diff --git a/ui/app/AppLayouts/Profile/stores/ContactsStore.qml b/ui/app/AppLayouts/Profile/stores/ContactsStore.qml index a78ea9b1e3..87989ee848 100644 --- a/ui/app/AppLayouts/Profile/stores/ContactsStore.qml +++ b/ui/app/AppLayouts/Profile/stores/ContactsStore.qml @@ -25,6 +25,8 @@ QtObject { readonly property var showcaseContactAssetsModel: contactsModule.showcaseContactAssetsModel readonly property var showcaseContactSocialLinksModel: contactsModule.showcaseContactSocialLinksModel + readonly property bool isShowcaseForAContactLoading: contactsModule.showcaseForAContactLoading + // Support models for showcase for a contact with showcasePublicKey readonly property var showcaseCollectiblesModel: contactsModule.showcaseCollectiblesModel diff --git a/ui/app/AppLayouts/Profile/stores/ProfileSectionStore.qml b/ui/app/AppLayouts/Profile/stores/ProfileSectionStore.qml index 6853c30916..73af073b35 100644 --- a/ui/app/AppLayouts/Profile/stores/ProfileSectionStore.qml +++ b/ui/app/AppLayouts/Profile/stores/ProfileSectionStore.qml @@ -201,6 +201,7 @@ QtObject { isAddressSaved: (address) => { return false } + isShowcaseLoading: root.contactsStore.isShowcaseForAContactLoading } } diff --git a/ui/imports/shared/views/profile/ProfileShowcaseCommunitiesView.qml b/ui/imports/shared/views/profile/ProfileShowcaseCommunitiesView.qml index b6b636c49c..1f88ab62f8 100644 --- a/ui/imports/shared/views/profile/ProfileShowcaseCommunitiesView.qml +++ b/ui/imports/shared/views/profile/ProfileShowcaseCommunitiesView.qml @@ -54,7 +54,7 @@ Item { implicitHeight: GridView.view.cellHeight - Style.current.padding titleFontSize: 15 communityId: model.id ?? "" - loaded: !!model.id + loaded: !!model.id && !model.isShowcaseLoading asset.source: model.image ?? "" asset.isImage: !!model.image asset.width: 32