mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-01-26 19:09:52 +00:00
Remove deprecated method isFavourite (#1397)
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user