Consolidate fileSize formatting logic
This commit is contained in:
parent
568e31a7bf
commit
c4ba3c44ce
6 changed files with 16 additions and 11 deletions
|
@ -3,7 +3,6 @@
|
|||
|
||||
import { groupBy, isEmpty, isNumber, isObject, map } from 'lodash';
|
||||
import { createSelector } from 'reselect';
|
||||
import filesize from 'filesize';
|
||||
import getDirection from 'direction';
|
||||
import emojiRegex from 'emoji-regex';
|
||||
import LinkifyIt from 'linkify-it';
|
||||
|
@ -141,6 +140,7 @@ import { CallDirection } from '../../types/CallDisposition';
|
|||
import { getCallIdFromEra } from '../../util/callDisposition';
|
||||
import { LONG_MESSAGE } from '../../types/MIME';
|
||||
import type { MessageRequestResponseNotificationData } from '../../components/conversation/MessageRequestResponseNotification';
|
||||
import { formatFileSize } from '../../util/formatFileSize';
|
||||
|
||||
export { isIncoming, isOutgoing, isStory };
|
||||
|
||||
|
@ -1806,7 +1806,7 @@ export function getPropsForAttachment(
|
|||
|
||||
return {
|
||||
...attachment,
|
||||
fileSize: size ? filesize(size) : undefined,
|
||||
fileSize: size ? formatFileSize(size) : undefined,
|
||||
isVoiceMessage: isVoiceMessage(attachment),
|
||||
pending,
|
||||
url: path ? getAttachmentUrlForPath(path) : undefined,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue