You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-07 10:46:24 +03:00
Make system fonts work more reliably (#8602)
* Make system fonts work more reliably * Make it more sophisticated * Missing semicolon * Apply suggestions * Fix formatting Co-authored-by: Michael Telatynski <7t3chguy@gmail.com> * Create FontWatcher-test.tsx * Add actual tests * Fix some errors * Apply suggestions * Apply suggestions from code review * Apply suggestions from code review * Apply suggestions from code review * Apply suggestions from code review * Fix FontWatcher tests * Correct test fixture Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
@@ -21,12 +21,10 @@ import EventEmitter from 'events';
|
||||
import CallHandler, {
|
||||
CallHandlerEvent, PROTOCOL_PSTN, PROTOCOL_PSTN_PREFIXED, PROTOCOL_SIP_NATIVE, PROTOCOL_SIP_VIRTUAL,
|
||||
} from '../src/CallHandler';
|
||||
import { stubClient, mkStubRoom } from './test-utils';
|
||||
import { stubClient, mkStubRoom, untilDispatch } from './test-utils';
|
||||
import { MatrixClientPeg } from '../src/MatrixClientPeg';
|
||||
import dis from '../src/dispatcher/dispatcher';
|
||||
import DMRoomMap from '../src/utils/DMRoomMap';
|
||||
import SdkConfig from '../src/SdkConfig';
|
||||
import { ActionPayload } from '../src/dispatcher/payloads';
|
||||
import { Action } from "../src/dispatcher/actions";
|
||||
|
||||
// The Matrix IDs that the user sees when talking to Alice & Bob
|
||||
@@ -95,18 +93,6 @@ class FakeCall extends EventEmitter {
|
||||
}
|
||||
}
|
||||
|
||||
function untilDispatch(waitForAction: string): Promise<ActionPayload> {
|
||||
let dispatchHandle;
|
||||
return new Promise<ActionPayload>(resolve => {
|
||||
dispatchHandle = dis.register(payload => {
|
||||
if (payload.action === waitForAction) {
|
||||
dis.unregister(dispatchHandle);
|
||||
resolve(payload);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function untilCallHandlerEvent(callHandler: CallHandler, event: CallHandlerEvent): Promise<void> {
|
||||
return new Promise<void>((resolve) => {
|
||||
callHandler.addListener(event, () => {
|
||||
|
||||
Reference in New Issue
Block a user