From 25c7a2febd4fd057be894026df89b37c63f1479b Mon Sep 17 00:00:00 2001 From: Audric Ackermann Date: Tue, 9 Nov 2021 15:45:18 +1100 Subject: [PATCH] data extraction notification on a line rather than a column --- ts/components/basic/Text.tsx | 9 +++++++++ .../conversation/DataExtractionNotification.tsx | 7 ++++--- ts/components/session/ActionsPanel.tsx | 4 +--- ts/session/utils/AttachmentsV2.ts | 9 +++++---- 4 files changed, 19 insertions(+), 10 deletions(-) diff --git a/ts/components/basic/Text.tsx b/ts/components/basic/Text.tsx index f6afff90b..8292ece30 100644 --- a/ts/components/basic/Text.tsx +++ b/ts/components/basic/Text.tsx @@ -35,6 +35,15 @@ const SpacerStyled = styled.div` : props.size === 'sm' ? 'var(--margins-sm)' : 'var(--margins-xs)'}; + + width: ${props => + props.size === 'lg' + ? 'var(--margins-lg)' + : props.size === 'md' + ? 'var(--margins-md)' + : props.size === 'sm' + ? 'var(--margins-sm)' + : 'var(--margins-xs)'}; `; const Spacer = (props: SpacerProps) => { diff --git a/ts/components/conversation/DataExtractionNotification.tsx b/ts/components/conversation/DataExtractionNotification.tsx index f1813cef2..1ac60d806 100644 --- a/ts/components/conversation/DataExtractionNotification.tsx +++ b/ts/components/conversation/DataExtractionNotification.tsx @@ -3,7 +3,7 @@ import { PropsForDataExtractionNotification } from '../../models/messageType'; import { SignalService } from '../../protobuf'; import { Flex } from '../basic/Flex'; import { SessionIcon } from '../session/icon'; -import { SpacerXS, Text } from '../basic/Text'; +import { SpacerSM, Text } from '../basic/Text'; import { ReadableMessage } from './ReadableMessage'; export const DataExtractionNotification = (props: PropsForDataExtractionNotification) => { @@ -25,13 +25,14 @@ export const DataExtractionNotification = (props: PropsForDataExtractionNotifica > - + diff --git a/ts/components/session/ActionsPanel.tsx b/ts/components/session/ActionsPanel.tsx index 84f268cc3..4952fdffc 100644 --- a/ts/components/session/ActionsPanel.tsx +++ b/ts/components/session/ActionsPanel.tsx @@ -224,13 +224,11 @@ const doAppStartUp = () => { // trigger a sync message if needed for our other devices void triggerSyncIfNeeded(); + void getSwarmPollingInstance().start(); void loadDefaultRooms(); debounce(triggerAvatarReUploadIfNeeded, 200); - - // TODO: Investigate the case where we reconnect - void getSwarmPollingInstance().start(); }; const CallContainer = () => { diff --git a/ts/session/utils/AttachmentsV2.ts b/ts/session/utils/AttachmentsV2.ts index b352ab221..e9ce556d4 100644 --- a/ts/session/utils/AttachmentsV2.ts +++ b/ts/session/utils/AttachmentsV2.ts @@ -12,6 +12,7 @@ import { uploadFileOpenGroupV2 } from '../../opengroup/opengroupV2/OpenGroupAPIV import { addAttachmentPadding } from '../crypto/BufferPadding'; import { RawPreview, RawQuote } from './Attachments'; import _ from 'lodash'; +import { AttachmentsV2Utils } from '.'; interface UploadParamsV2 { attachment: Attachment; @@ -60,7 +61,7 @@ export async function uploadAttachmentsV2( openGroup: OpenGroupRequestCommonType ): Promise> { const promises = (attachments || []).map(async attachment => - exports.uploadV2({ + AttachmentsV2Utils.uploadV2({ attachment, openGroup, }) @@ -80,7 +81,7 @@ export async function uploadLinkPreviewsV2( return undefined; } - const image = await exports.uploadV2({ + const image = await AttachmentsV2Utils.uploadV2({ attachment: preview.image, openGroup, }); @@ -105,10 +106,10 @@ export async function uploadQuoteThumbnailsV2( const promises = (quote.attachments ?? []).map(async attachment => { let thumbnail: QuotedAttachment | undefined; if (attachment.thumbnail) { - thumbnail = await exports.uploadV2({ + thumbnail = (await AttachmentsV2Utils.uploadV2({ attachment: attachment.thumbnail, openGroup, - }); + })) as any; } return { ...attachment,