From a11b78d1c30f0ad7f49838812d2b4da90dcdf771 Mon Sep 17 00:00:00 2001 From: Chenlei Hu Date: Fri, 1 Nov 2024 19:12:04 -0400 Subject: [PATCH] Remove deprecated method isFavourite (#1397) --- src/scripts/workflows.ts | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/src/scripts/workflows.ts b/src/scripts/workflows.ts index 2179ae2a8..28ebca9f8 100644 --- a/src/scripts/workflows.ts +++ b/src/scripts/workflows.ts @@ -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)