From e4a221e42ded1641fdc1ef4f067fc17b3555f25a Mon Sep 17 00:00:00 2001 From: David Baker Date: Tue, 15 May 2018 17:28:55 +0100 Subject: [PATCH] More helpful function name --- src/ScalarMessaging.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ScalarMessaging.js b/src/ScalarMessaging.js index 14d363894e..01ee140eb3 100644 --- a/src/ScalarMessaging.js +++ b/src/ScalarMessaging.js @@ -300,7 +300,9 @@ function waitForUserWidget(widgetId, add) { return new Promise((resolve, reject) => { const currentAccountDataEvent = MatrixClientPeg.get().getAccountData('m.widgets'); - function satisfiesCondition(ev) { + // Tests an account data event, returning true if it's in the state + // we're waiting for it to be in + function eventInIntendedState(ev) { if (!ev || !currentAccountDataEvent.getContent()) return false; if (add) { return ev.getContent()[widgetId] !== undefined;