Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 14 additions & 8 deletions src/views/GraphView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -206,19 +206,25 @@ const init = () => {
}

const queuePendingTaskCountStore = useQueuePendingTaskCountStore()
const sidebarTabStore = useSidebarTabStore()

const onStatus = async (e: CustomEvent<StatusWsMessageStatus>) => {
queuePendingTaskCountStore.update(e)
await Promise.all([
queueStore.update(),
assetsStore.updateHistory() // Update history assets when status changes
])
await queueStore.update()
// Only update assets if the assets sidebar is currently open
// When sidebar is closed, AssetsSidebarTab.vue will refresh on mount
if (sidebarTabStore.activeSidebarTabId === 'assets') {
await assetsStore.updateHistory()
}
}

const onExecutionSuccess = async () => {
await Promise.all([
queueStore.update(),
assetsStore.updateHistory() // Update history assets on execution success
])
await queueStore.update()
// Only update assets if the assets sidebar is currently open
// When sidebar is closed, AssetsSidebarTab.vue will refresh on mount
if (sidebarTabStore.activeSidebarTabId === 'assets') {
await assetsStore.updateHistory()
}
}

const reconnectingMessage: ToastMessageOptions = {
Expand Down
Loading