Send a 'close' action when the widget is ready to close

By keeping 'hangup' and 'close' as separate actions, we can allow Element Call widgets to stay on an error screen after the user has been disconnected without the widget completely disappearing from the host's UI. We don't have to request any additional capabilities to use a custom widget action like this one.
This commit is contained in:
Robin
2025-02-17 19:19:31 +07:00
parent 0f5dc33918
commit a75952cf77
7 changed files with 105 additions and 22 deletions

View File

@@ -50,6 +50,10 @@ export function withFakeTimers(continuation: () => void): void {
}
}
export async function flushPromises(): Promise<void> {
await new Promise<void>((resolve) => window.setTimeout(resolve));
}
export interface OurRunHelpers extends RunHelpers {
/**
* Schedules a sequence of actions to happen, as described by a marble