Remove deprecated method isFavourite (#1397)

This commit is contained in:
Chenlei Hu
2024-11-01 19:12:04 -04:00
committed by GitHub
parent dfb695be72
commit a11b78d1c3

View File

@@ -193,13 +193,6 @@ export class ComfyWorkflow {
return this.manager.workflowBookmarkStore?.isBookmarked(this.path) ?? false
}
/**
* @deprecated Use isBookmarked instead
*/
get isFavorite() {
return this.isBookmarked
}
constructor(
manager: ComfyWorkflowManager,
path: string,
@@ -310,13 +303,12 @@ export class ComfyWorkflow {
return
}
const isFav = this.isFavorite
if (isFav) {
if (this.isBookmarked) {
await this.favorite(false)
}
path = (await resp.json()).substring('workflows/'.length)
this.updatePath(path, null)
if (isFav) {
if (this.isBookmarked) {
await this.favorite(true)
}
this.manager.dispatchEvent(new CustomEvent('rename', { detail: this }))
@@ -342,7 +334,7 @@ export class ComfyWorkflow {
async delete() {
// TODO: fix delete of current workflow - should mark workflow as unsaved and when saving use old name by default
if (this.isFavorite) {
if (this.isBookmarked) {
await this.favorite(false)
}
const resp = await api.deleteUserData('workflows/' + this.path)