mirror of https://github.com/vector-im/riot-web
More helpful function name
parent
bb5ae741bc
commit
e4a221e42d
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue