mirror of
https://github.com/langgenius/dify.git
synced 2026-04-15 18:06:36 +08:00
fix: debounce follower workflow sync requests in collaboration mode
This commit is contained in:
parent
effe12cbee
commit
d8e0b499df
@ -1,7 +1,6 @@
|
||||
import type { SyncDraftCallback } from '../hooks-store'
|
||||
import { useCallback } from 'react'
|
||||
import { useHooksStore } from '@/app/components/workflow/hooks-store'
|
||||
import { collaborationManager } from '../collaboration/core/collaboration-manager'
|
||||
import { useStore } from '../store'
|
||||
import { useNodesReadOnly } from './use-workflow'
|
||||
|
||||
@ -21,12 +20,6 @@ export const useNodesSyncDraft = () => {
|
||||
if (getNodesReadOnly())
|
||||
return
|
||||
|
||||
if (collaborationManager.isConnected() && !collaborationManager.getIsLeader()) {
|
||||
if (sync)
|
||||
collaborationManager.emitSyncRequest()
|
||||
return
|
||||
}
|
||||
|
||||
if (sync)
|
||||
doSyncWorkflowDraft(notRefreshWhenSyncError, callback)
|
||||
else
|
||||
|
||||
Loading…
Reference in New Issue
Block a user