From 4159148ab7ce7aefe4b79599030b021090eea9a4 Mon Sep 17 00:00:00 2001 From: Jonathan Rainville Date: Wed, 31 Jul 2024 10:00:56 -0400 Subject: [PATCH] fix(profile): fix canceling modifications in the profile (#15905) (#15906) Fixes #15904 --- .../Components/StatusDraggableListItem.qml | 4 +-- .../Profile/stores/ProfileStore.qml | 30 ------------------- .../Profile/views/MyProfileView.qml | 1 - 3 files changed, 2 insertions(+), 33 deletions(-) diff --git a/ui/StatusQ/src/StatusQ/Components/StatusDraggableListItem.qml b/ui/StatusQ/src/StatusQ/Components/StatusDraggableListItem.qml index f95b63850f..7c9c2256d2 100644 --- a/ui/StatusQ/src/StatusQ/Components/StatusDraggableListItem.qml +++ b/ui/StatusQ/src/StatusQ/Components/StatusDraggableListItem.qml @@ -44,12 +44,12 @@ import StatusQ.Core.Theme 0.1 const to = draggableDelegate.visualIndex if (to === from) return - root.profileStore.moveLink(from, to, 1) + functionToMoveTo(from, to, 1) drag.accept() } onDropped: function(drop) { - root.profileStore.saveSocialLinks(true) + functionToSave(true) } StatusDraggableListItem { diff --git a/ui/app/AppLayouts/Profile/stores/ProfileStore.qml b/ui/app/AppLayouts/Profile/stores/ProfileStore.qml index 58f2d07bbc..632962d293 100644 --- a/ui/app/AppLayouts/Profile/stores/ProfileStore.qml +++ b/ui/app/AppLayouts/Profile/stores/ProfileStore.qml @@ -113,36 +113,6 @@ QtObject { root.profileModule.setIsFirstShowcaseInteraction() } - // Social links related: All to be removed: Deprecated --> Issue #13688 - function containsSocialLink(text, url) { - return root.profileModule.containsSocialLink(text, url) - } - - function createLink(text, url, linkType, icon) { - root.profileModule.createLink(text, url, linkType, icon) - } - - function removeLink(uuid) { - root.profileModule.removeLink(uuid) - } - - function updateLink(uuid, text, url) { - root.profileModule.updateLink(uuid, text, url) - } - - function moveLink(fromRow, toRow, count) { - root.profileModule.moveLink(fromRow, toRow) - } - - function resetSocialLinks() { - root.profileModule.resetSocialLinks() - } - - function saveSocialLinks(silent = false) { - root.profileModule.saveSocialLinks(silent) - } - // End of social links to be removed - onUserDeclinedBackupBannerChanged: { if (userDeclinedBackupBanner !== localAccountSensitiveSettings.userDeclinedBackupBanner) { localAccountSensitiveSettings.userDeclinedBackupBanner = userDeclinedBackupBanner diff --git a/ui/app/AppLayouts/Profile/views/MyProfileView.qml b/ui/app/AppLayouts/Profile/views/MyProfileView.qml index 5d837cadba..eb3d6c4bd5 100644 --- a/ui/app/AppLayouts/Profile/views/MyProfileView.qml +++ b/ui/app/AppLayouts/Profile/views/MyProfileView.qml @@ -199,7 +199,6 @@ SettingsContentBase { function reset() { descriptionPanel.displayName.text = Qt.binding(() => { return profileStore.displayName }) descriptionPanel.bio.text = Qt.binding(() => { return profileStore.bio }) - profileStore.resetSocialLinks() profileHeader.icon = Qt.binding(() => { return profileStore.profileLargeImage }) priv.showcaseModels.revert()