1
0
Fork 0
mirror of synced 2024-09-20 11:27:56 +12:00

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

View file

@ -28,11 +28,9 @@ export class ScreenStore extends BudiStore {
this.reset = this.reset.bind(this) this.reset = this.reset.bind(this)
this.syncAppScreens = this.syncAppScreens.bind(this) this.syncAppScreens = this.syncAppScreens.bind(this)
this.validate = this.validate.bind(this) this.validate = this.validate.bind(this)
this.save = this.save.bind(this)
this.patch = this.patch.bind(this) this.patch = this.patch.bind(this)
this.replace = this.replace.bind(this) this.replace = this.replace.bind(this)
this.saveScreen = this.saveScreen.bind(this) this.saveScreen = this.saveScreen.bind(this)
this.delete = this.delete.bind(this)
this.deleteScreen = this.deleteScreen.bind(this) this.deleteScreen = this.deleteScreen.bind(this)
this.syncScreenData = this.syncScreenData.bind(this) this.syncScreenData = this.syncScreenData.bind(this)
this.updateSetting = this.updateSetting.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 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 * Update a screen by deep setting a property value by name
* *