signal-desktop/ts/util/maybeBlockSendForFormattingModal.ts

11 lines
381 B
TypeScript
Raw Normal View History

// Copyright 2022 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import { explodePromise } from './explodePromise';
2023-06-14 22:00:30 +00:00
export async function maybeBlockSendForFormattingModal(): Promise<boolean> {
const explodedPromise = explodePromise<boolean>();
window.reduxActions.globalModals.showFormattingWarningModal(explodedPromise);
return explodedPromise.promise;
}