MCPcopy Create free account
hub / github.com/chhoumann/quickadd / constructor

Method constructor

src/gui/UpdateModal/UpdateModal.ts:192–217  ·  view source on GitHub ↗
(app: App, previousQAVersion: string)

Source from the content-addressed store, hash-verified

190 private isClosed = false;
191
192 constructor(app: App, previousQAVersion: string) {
193 super(app);
194 this.previousVersion = previousQAVersion;
195
196 this.releaseNotesPromise = getReleaseNotesAfter(
197 "chhoumann",
198 "quickadd",
199 previousQAVersion
200 );
201 this.releaseNotesPromise
202 .then((releases) => {
203 if (this.isClosed) return;
204
205 this.releases = releases;
206
207 if (this.releases.length === 0) {
208 this.close();
209 return;
210 }
211
212 this.display();
213 })
214 .catch((err) => {
215 log.logError(`Failed to fetch release notes: ${err as string}`);
216 });
217 }
218
219 onOpen() {
220 const { contentEl } = this;

Callers

nothing calls this directly

Calls 5

displayMethod · 0.95
getReleaseNotesAfterFunction · 0.85
thenMethod · 0.80
closeMethod · 0.65
logErrorMethod · 0.65

Tested by

no test coverage detected