MCPcopy Index your code
hub / github.com/mailvelope/mailvelope / flush

Method flush

src/controller/main.controller.js:41–53  ·  view source on GitHub ↗
(eventHandler)

Source from the content-addressed store, hash-verified

39 }
40
41 flush(eventHandler) {
42 eventHandler.deactivatePortMessages();
43 // wait for other incoming port connects
44 setTimeout(async () => {
45 const {id} = parseViewName(this.port.name);
46 // check the addPort sequence and wait for last addPort action with the same id to be finished before flush
47 const addPortAction = this.addPortSequence.queue.findLast(element => element.args[0].name.includes(id));
48 if (addPortAction) {
49 await addPortAction.promise;
50 }
51 this.#flushEvent(eventHandler);
52 }, 50);
53 }
54}
55
56class ControllerTransaction {

Callers 3

createControllerFunction · 0.80
initMainPortMethod · 0.80
addPortMethod · 0.80

Calls 3

#flushEventMethod · 0.95
parseViewNameFunction · 0.90

Tested by

no test coverage detected