fix(profile): fix canceling modifications in the profile (#15905)

Fixes #15904
This commit is contained in:
Jonathan Rainville 2024-07-30 17:27:13 -04:00 committed by GitHub
parent 8e7465b7b6
commit 31bc87b63d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 2 additions and 33 deletions

View File

@ -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 {

View File

@ -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

View File

@ -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()