signal-desktop/ts/context/index.ts

26 lines
623 B
TypeScript
Raw Normal View History

2021-06-22 14:46:42 +00:00
// Copyright 2021 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import { Bytes } from './Bytes';
2021-09-24 00:49:05 +00:00
import { Crypto } from './Crypto';
2021-09-17 22:24:21 +00:00
import {
createNativeThemeListener,
MinimalIPC,
} from './createNativeThemeListener';
2021-06-22 14:46:42 +00:00
export class Context {
public readonly bytes = new Bytes();
2021-09-24 00:49:05 +00:00
public readonly crypto = new Crypto();
public readonly nativeThemeListener;
constructor(private readonly ipc: MinimalIPC) {
2021-09-17 22:24:21 +00:00
this.nativeThemeListener = createNativeThemeListener(ipc, window);
}
setIsCallActive(isCallActive: boolean): void {
this.ipc.send('set-is-call-active', isCallActive);
}
2021-06-22 14:46:42 +00:00
}