From a83a85d5577f4688af735002af3168faeebc3254 Mon Sep 17 00:00:00 2001 From: Fedor Indutny <79877362+indutny-signal@users.noreply.github.com> Date: Thu, 23 Feb 2023 14:37:55 -0800 Subject: [PATCH] Enable SquirrelMacEnableDirectContentsWrite --- app/main.ts | 2 +- ts/components/CompositionArea.tsx | 46 ++++++++++++++++--------------- ts/components/StoryViewer.tsx | 19 +++++++------ 3 files changed, 35 insertions(+), 32 deletions(-) diff --git a/app/main.ts b/app/main.ts index 6ba03a91b5..30574193c8 100644 --- a/app/main.ts +++ b/app/main.ts @@ -120,7 +120,7 @@ import type { LoggerType } from '../ts/types/Logging'; const animationSettings = systemPreferences.getAnimationSettings(); -if (OS.isMacOS() && !isProduction(app.getVersion())) { +if (OS.isMacOS()) { systemPreferences.setUserDefault( 'SquirrelMacEnableDirectContentsWrite', 'boolean', diff --git a/ts/components/CompositionArea.tsx b/ts/components/CompositionArea.tsx index f631fda165..0527616825 100644 --- a/ts/components/CompositionArea.tsx +++ b/ts/components/CompositionArea.tsx @@ -635,29 +635,31 @@ export function CompositionArea({ return (
- {attachmentToEdit && 'url' in attachmentToEdit && attachmentToEdit.url && ( - setAttachmentToEdit(undefined)} - onDone={({ data, contentType, blurHash }) => { - const newAttachment = { - ...attachmentToEdit, - contentType, - blurHash, - data, - size: data.byteLength, - }; + {attachmentToEdit && + 'url' in attachmentToEdit && + attachmentToEdit.url && ( + setAttachmentToEdit(undefined)} + onDone={({ data, contentType, blurHash }) => { + const newAttachment = { + ...attachmentToEdit, + contentType, + blurHash, + data, + size: data.byteLength, + }; - addAttachment(conversationId, newAttachment); - setAttachmentToEdit(undefined); - }} - installedPacks={installedPacks} - recentStickers={recentStickers} - /> - )} + addAttachment(conversationId, newAttachment); + setAttachmentToEdit(undefined); + }} + installedPacks={installedPacks} + recentStickers={recentStickers} + /> + )}
- )} + {sendStatus === ResolvedSendStatus.Failed && + !wasManuallyRetried && ( + + )} {sendStatus === ResolvedSendStatus.PartiallySent && !wasManuallyRetried && (