Skip to content

Commit

Permalink
fix(profile): fix canceling modifications in the profile (#15905) (#1…
Browse files Browse the repository at this point in the history
  • Loading branch information
jrainville authored Jul 31, 2024
1 parent 2447fa3 commit 4159148
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 33 deletions.
4 changes: 2 additions & 2 deletions ui/StatusQ/src/StatusQ/Components/StatusDraggableListItem.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
30 changes: 0 additions & 30 deletions ui/app/AppLayouts/Profile/stores/ProfileStore.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion ui/app/AppLayouts/Profile/views/MyProfileView.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 4159148

Please sign in to comment.