Uint8Array migration
This commit is contained in:
parent
daf75190b8
commit
4ef0bf96cc
137 changed files with 2202 additions and 3170 deletions
|
@ -1,16 +1,14 @@
|
|||
// Copyright 2021 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
import { AttachmentType } from '../types/Attachment';
|
||||
import { AttachmentType, getUploadSizeLimitKb } from '../types/Attachment';
|
||||
import { showToast } from './showToast';
|
||||
import { ToastFileSize } from '../components/ToastFileSize';
|
||||
|
||||
export function isAttachmentSizeOkay(
|
||||
attachment: Readonly<AttachmentType>
|
||||
): boolean {
|
||||
const limitKb = window.Signal.Types.Attachment.getUploadSizeLimitKb(
|
||||
attachment.contentType
|
||||
);
|
||||
const limitKb = getUploadSizeLimitKb(attachment.contentType);
|
||||
// this needs to be cast properly
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue