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

Function addToUpdateContentQueue

src/renderer/composables/useSnippetUpdate.ts:90–104  ·  view source on GitHub ↗
(
  snippetId: number,
  contentId: number,
  data: SnippetContentsAdd,
)

Source from the content-addressed store, hash-verified

88}
89
90function addToUpdateContentQueue(
91 snippetId: number,
92 contentId: number,
93 data: SnippetContentsAdd,
94) {
95 markUserEdit()
96 const key = getContentUpdateKey(snippetId, contentId)
97 updateContentQueue.value.set(key, { snippetId, contentId, data })
98
99 if (inFlightContentKeys.value.has(key)) {
100 return
101 }
102
103 scheduleContentUpdate(key)
104}
105
106function getPendingContentUpdate(snippetId: number, contentId: number) {
107 const key = getContentUpdateKey(snippetId, contentId)

Callers

nothing calls this directly

Calls 4

markUserEditFunction · 0.90
getContentUpdateKeyFunction · 0.85
scheduleContentUpdateFunction · 0.70
setMethod · 0.45

Tested by

no test coverage detected