More helpful function name

pull/21833/head
David Baker 2018-05-15 17:28:55 +01:00
parent bb5ae741bc
commit e4a221e42d
1 changed files with 3 additions and 1 deletions

View File

@ -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;