data extraction notification on a line rather than a column

pull/1993/head
Audric Ackermann 4 years ago
parent cca1b4dabe
commit 25c7a2febd
No known key found for this signature in database
GPG Key ID: 999F434D76324AD4

@ -35,6 +35,15 @@ const SpacerStyled = styled.div<SpacerProps>`
: props.size === 'sm' : props.size === 'sm'
? 'var(--margins-sm)' ? 'var(--margins-sm)'
: 'var(--margins-xs)'}; : '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) => { const Spacer = (props: SpacerProps) => {

@ -3,7 +3,7 @@ import { PropsForDataExtractionNotification } from '../../models/messageType';
import { SignalService } from '../../protobuf'; import { SignalService } from '../../protobuf';
import { Flex } from '../basic/Flex'; import { Flex } from '../basic/Flex';
import { SessionIcon } from '../session/icon'; import { SessionIcon } from '../session/icon';
import { SpacerXS, Text } from '../basic/Text'; import { SpacerSM, Text } from '../basic/Text';
import { ReadableMessage } from './ReadableMessage'; import { ReadableMessage } from './ReadableMessage';
export const DataExtractionNotification = (props: PropsForDataExtractionNotification) => { export const DataExtractionNotification = (props: PropsForDataExtractionNotification) => {
@ -25,13 +25,14 @@ export const DataExtractionNotification = (props: PropsForDataExtractionNotifica
> >
<Flex <Flex
container={true} container={true}
flexDirection="column" flexDirection="row"
alignItems="center" alignItems="center"
justifyContent="center"
margin={'var(--margins-sm)'} margin={'var(--margins-sm)'}
id={`msg-${messageId}`} id={`msg-${messageId}`}
> >
<SessionIcon iconType="upload" iconSize={'small'} iconRotation={180} /> <SessionIcon iconType="upload" iconSize={'small'} iconRotation={180} />
<SpacerXS /> <SpacerSM />
<Text text={contentText} subtle={true} /> <Text text={contentText} subtle={true} />
</Flex> </Flex>
</ReadableMessage> </ReadableMessage>

@ -224,13 +224,11 @@ const doAppStartUp = () => {
// trigger a sync message if needed for our other devices // trigger a sync message if needed for our other devices
void triggerSyncIfNeeded(); void triggerSyncIfNeeded();
void getSwarmPollingInstance().start();
void loadDefaultRooms(); void loadDefaultRooms();
debounce(triggerAvatarReUploadIfNeeded, 200); debounce(triggerAvatarReUploadIfNeeded, 200);
// TODO: Investigate the case where we reconnect
void getSwarmPollingInstance().start();
}; };
const CallContainer = () => { const CallContainer = () => {

@ -12,6 +12,7 @@ import { uploadFileOpenGroupV2 } from '../../opengroup/opengroupV2/OpenGroupAPIV
import { addAttachmentPadding } from '../crypto/BufferPadding'; import { addAttachmentPadding } from '../crypto/BufferPadding';
import { RawPreview, RawQuote } from './Attachments'; import { RawPreview, RawQuote } from './Attachments';
import _ from 'lodash'; import _ from 'lodash';
import { AttachmentsV2Utils } from '.';
interface UploadParamsV2 { interface UploadParamsV2 {
attachment: Attachment; attachment: Attachment;
@ -60,7 +61,7 @@ export async function uploadAttachmentsV2(
openGroup: OpenGroupRequestCommonType openGroup: OpenGroupRequestCommonType
): Promise<Array<AttachmentPointerWithUrl>> { ): Promise<Array<AttachmentPointerWithUrl>> {
const promises = (attachments || []).map(async attachment => const promises = (attachments || []).map(async attachment =>
exports.uploadV2({ AttachmentsV2Utils.uploadV2({
attachment, attachment,
openGroup, openGroup,
}) })
@ -80,7 +81,7 @@ export async function uploadLinkPreviewsV2(
return undefined; return undefined;
} }
const image = await exports.uploadV2({ const image = await AttachmentsV2Utils.uploadV2({
attachment: preview.image, attachment: preview.image,
openGroup, openGroup,
}); });
@ -105,10 +106,10 @@ export async function uploadQuoteThumbnailsV2(
const promises = (quote.attachments ?? []).map(async attachment => { const promises = (quote.attachments ?? []).map(async attachment => {
let thumbnail: QuotedAttachment | undefined; let thumbnail: QuotedAttachment | undefined;
if (attachment.thumbnail) { if (attachment.thumbnail) {
thumbnail = await exports.uploadV2({ thumbnail = (await AttachmentsV2Utils.uploadV2({
attachment: attachment.thumbnail, attachment: attachment.thumbnail,
openGroup, openGroup,
}); })) as any;
} }
return { return {
...attachment, ...attachment,

Loading…
Cancel
Save