Fix Screen History Issue (#14207)

This commit is contained in:
Gerard Burns 2024-07-22 09:33:27 +01:00 committed by GitHub
parent 7548b48f9e
commit 9d8e470aa6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 21 deletions

View File

@ -28,11 +28,9 @@ export class ScreenStore extends BudiStore {
this.reset = this.reset.bind(this)
this.syncAppScreens = this.syncAppScreens.bind(this)
this.validate = this.validate.bind(this)
this.save = this.save.bind(this)
this.patch = this.patch.bind(this)
this.replace = this.replace.bind(this)
this.saveScreen = this.saveScreen.bind(this)
this.delete = this.delete.bind(this)
this.deleteScreen = this.deleteScreen.bind(this)
this.syncScreenData = this.syncScreenData.bind(this)
this.updateSetting = this.updateSetting.bind(this)
@ -52,6 +50,9 @@ export class ScreenStore extends BudiStore {
}
},
})
this.delete = this.history.wrapDeleteDoc(this.deleteScreen)
this.save = this.history.wrapSaveDoc(this.saveScreen)
}
/**
@ -382,25 +383,6 @@ export class ScreenStore extends BudiStore {
return null
}
/**
* {@link deleteScreen} wrapped to enable history tracking
* @param {object | array} screen
*
*/
async delete(screens_x) {
const wrappedFn = this.history.wrapDeleteDoc(this.deleteScreen)
return wrappedFn(screens_x)
}
/**
* {@link saveScreen} wrapped to enable history tracking
* @param {object} screen
*/
async save(screen) {
const wrappedFn = this.history.wrapSaveDoc(this.saveScreen)
return wrappedFn(screen)
}
/**
* Update a screen by deep setting a property value by name
*