MCPcopy
hub / github.com/GooseMod/OpenAsar / send

Method send

src/splash/index.js:103–115  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

101 }
102
103 send() {
104 if ((toSend === -1 && this.progress.size > 0 && this.progress.size > this.done.size) || toSend === this.st) {
105 const progress = Math.min(100, [...this.progress.values()].reduce((a, x) => a + x[0], 0) / [...this.progress.values()].reduce((a, x) => a + x[1], 0) * 100); // Clamp progress to 0-100
106
107 sendState(this.st ? 'installing' : 'downloading', {
108 current: this.done.size + 1,
109 total: this.total.size,
110 progress
111 });
112
113 return true;
114 }
115 }
116}
117
118const initNew = async (inst) => {

Callers 6

recordMethod · 0.95
initNewFunction · 0.95
mainWindow.jsFile · 0.80
sendStateFunction · 0.80
preload.jsFile · 0.80
preload.jsFile · 0.80

Calls 1

sendStateFunction · 0.85

Tested by

no test coverage detected