You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-08 21:42:24 +03:00
More helpful function name
This commit is contained in:
@@ -300,7 +300,9 @@ function waitForUserWidget(widgetId, add) {
|
|||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
const currentAccountDataEvent = MatrixClientPeg.get().getAccountData('m.widgets');
|
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 (!ev || !currentAccountDataEvent.getContent()) return false;
|
||||||
if (add) {
|
if (add) {
|
||||||
return ev.getContent()[widgetId] !== undefined;
|
return ev.getContent()[widgetId] !== undefined;
|
||||||
|
|||||||
Reference in New Issue
Block a user