mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-20 14:30:41 +00:00
Fix for history items sometimes not appearing again
New items from the history endpoint were being ignored due to the sorting based on priority, and left out of the merge Fixed by removing that optimization so they all go through merge.
This commit is contained in:
committed by
Jennifer Weber
parent
a0d66bb0d7
commit
68f0275a83
@@ -437,10 +437,6 @@ export const useQueueStore = defineStore('queue', () => {
|
||||
tasks.value.flatMap((task: TaskItemImpl) => task.flatten())
|
||||
)
|
||||
|
||||
const lastHistoryQueueIndex = computed<number>(() =>
|
||||
historyTasks.value.length ? historyTasks.value[0].queueIndex : -1
|
||||
)
|
||||
|
||||
const hasPendingTasks = computed<boolean>(() => pendingTasks.value.length > 0)
|
||||
|
||||
const update = async () => {
|
||||
@@ -471,11 +467,7 @@ export const useQueueStore = defineStore('queue', () => {
|
||||
const allIndex = new Set<number>(
|
||||
history.History.map((item: TaskItem) => item.prompt.priority)
|
||||
)
|
||||
const newHistoryItems = toClassAll(
|
||||
history.History.filter(
|
||||
(item) => item.prompt.priority > lastHistoryQueueIndex.value
|
||||
)
|
||||
)
|
||||
const newHistoryItems = toClassAll(history.History)
|
||||
const existingHistoryItems = historyTasks.value.filter((item) =>
|
||||
allIndex.has(item.queueIndex)
|
||||
)
|
||||
@@ -524,7 +516,6 @@ export const useQueueStore = defineStore('queue', () => {
|
||||
|
||||
tasks,
|
||||
flatTasks,
|
||||
lastHistoryQueueIndex,
|
||||
hasPendingTasks,
|
||||
|
||||
update,
|
||||
|
||||
Reference in New Issue
Block a user