Use more consistent start/stop pattern

This commit is contained in:
Luke Barnard 2018-06-15 17:58:43 +01:00
parent 488cc416cf
commit b0a2772889
2 changed files with 17 additions and 12 deletions

View file

@ -1318,10 +1318,10 @@ export default React.createClass({
// tracked events across sessions.
// dft.loadTrackedEventHashMap();
const stopDft = dft.start();
dft.start();
// When logging out, stop tracking failures and destroy state
cli.on("Session.logged_out", stopDft);
cli.on("Session.logged_out", () => dft.stop());
cli.on("Event.decrypted", (e) => dft.eventDecrypted(e));
const krh = new KeyRequestHandler(cli);