MCPcopy Create free account
hub / github.com/massCodeIO/massCode / scheduleContentUpdate

Function scheduleContentUpdate

src/renderer/composables/useSnippetUpdate.ts:69–81  ·  view source on GitHub ↗
(key: string)

Source from the content-addressed store, hash-verified

67}
68
69function scheduleContentUpdate(key: string) {
70 const pendingTimer = contentUpdateTimers.value.get(key)
71 if (pendingTimer) {
72 clearTimeout(pendingTimer)
73 }
74
75 const timer = setTimeout(() => {
76 contentUpdateTimers.value.delete(key)
77 void flushContentUpdate(key)
78 }, UPDATE_DEBOUNCE_TIME)
79
80 contentUpdateTimers.value.set(key, timer)
81}
82
83function addToUpdateQueue(snippetId: number, data: SnippetsUpdate) {
84 markUserEdit()

Callers 2

flushContentUpdateFunction · 0.70
addToUpdateContentQueueFunction · 0.70

Calls 3

flushContentUpdateFunction · 0.70
getMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected