MCPcopy Create free account
hub / github.com/mailvelope/mailvelope / constructor

Method constructor

src/controller/sync.controller.js:15–31  ·  view source on GitHub ↗
(port)

Source from the content-addressed store, hash-verified

13
14export class SyncController extends SubController {
15 constructor(port) {
16 super(port);
17 this.state = {
18 keyringId: null
19 };
20 this.keyring = null;
21 this.syncDoneHandler = {};
22 this.pwdControl = null;
23 this.syncRunning = false;
24 this.repeatSync = null;
25 this.TIMEOUT = 8; // sync timeout in seconds
26 this.modified = false;
27 this.singleton = true;
28 // register event handlers
29 this.on('init', ({keyringId}) => this.init(keyringId));
30 this.on('sync-done', this.syncDone);
31 }
32
33 async init(keyringId) {
34 this.setState({keyringId});

Callers

nothing calls this directly

Calls 2

initMethod · 0.95
onMethod · 0.45

Tested by

no test coverage detected