Enable formatting for all users

This commit is contained in:
Scott Nonnenberg 2023-06-14 15:00:30 -07:00 committed by GitHub
parent d2b06413f3
commit 23b058fe10
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 22 additions and 14 deletions

View file

@ -1,17 +1,9 @@
// Copyright 2022 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import type { DraftBodyRanges } from '../types/BodyRange';
import { BodyRange } from '../types/BodyRange';
import { explodePromise } from './explodePromise';
export async function maybeBlockSendForFormattingModal(
bodyRanges: DraftBodyRanges
): Promise<boolean> {
if (!bodyRanges.some(BodyRange.isFormatting)) {
return true;
}
export async function maybeBlockSendForFormattingModal(): Promise<boolean> {
const explodedPromise = explodePromise<boolean>();
window.reduxActions.globalModals.showFormattingWarningModal(explodedPromise);
return explodedPromise.promise;