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

Fixes #15904
This commit is contained in:
Jonathan Rainville 2024-07-31 10:00:56 -04:00 committed by GitHub
parent 2447fa3554
commit 4159148ab7
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 const to = draggableDelegate.visualIndex
if (to === from) if (to === from)
return return
root.profileStore.moveLink(from, to, 1) functionToMoveTo(from, to, 1)
drag.accept() drag.accept()
} }
onDropped: function(drop) { onDropped: function(drop) {
root.profileStore.saveSocialLinks(true) functionToSave(true)
} }
StatusDraggableListItem { StatusDraggableListItem {

View File

@ -113,36 +113,6 @@ QtObject {
root.profileModule.setIsFirstShowcaseInteraction() 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: { onUserDeclinedBackupBannerChanged: {
if (userDeclinedBackupBanner !== localAccountSensitiveSettings.userDeclinedBackupBanner) { if (userDeclinedBackupBanner !== localAccountSensitiveSettings.userDeclinedBackupBanner) {
localAccountSensitiveSettings.userDeclinedBackupBanner = userDeclinedBackupBanner localAccountSensitiveSettings.userDeclinedBackupBanner = userDeclinedBackupBanner

View File

@ -199,7 +199,6 @@ SettingsContentBase {
function reset() { function reset() {
descriptionPanel.displayName.text = Qt.binding(() => { return profileStore.displayName }) descriptionPanel.displayName.text = Qt.binding(() => { return profileStore.displayName })
descriptionPanel.bio.text = Qt.binding(() => { return profileStore.bio }) descriptionPanel.bio.text = Qt.binding(() => { return profileStore.bio })
profileStore.resetSocialLinks()
profileHeader.icon = Qt.binding(() => { return profileStore.profileLargeImage }) profileHeader.icon = Qt.binding(() => { return profileStore.profileLargeImage })
priv.showcaseModels.revert() priv.showcaseModels.revert()