From 28d7a1bab2fc9b3aca90788669c236ffd29c57ed Mon Sep 17 00:00:00 2001 From: Chris Price <56982873+cprice-kgi@users.noreply.github.com> Date: Tue, 14 Sep 2021 14:31:36 -0400 Subject: [PATCH] [FIX] Black screen on share extension if lock screen is enabled (#3320) * Resolve issue causing black screen when sharing * Add logEvent to error in local authenticate * minor tweak * Revert changes Co-authored-by: Reinaldo Neto Co-authored-by: Reinaldo Neto <47038980+reinaldonetof@users.noreply.github.com> Co-authored-by: Diego Mello --- app/utils/localAuthentication.js | 6 +++++- app/views/AttachmentView.js | 4 +--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/app/utils/localAuthentication.js b/app/utils/localAuthentication.js index 87df36f46..29f256850 100644 --- a/app/utils/localAuthentication.js +++ b/app/utils/localAuthentication.js @@ -110,7 +110,11 @@ export const localAuthenticate = async server => { // if screen lock is enabled if (serverRecord?.autoLock) { // Make sure splash screen has been hidden - await RNBootSplash.hide(); + try { + await RNBootSplash.hide(); + } catch { + // Do nothing + } // Check if the app has passcode const result = await checkHasPasscode({ serverRecord }); diff --git a/app/views/AttachmentView.js b/app/views/AttachmentView.js index a57405039..8f199b237 100644 --- a/app/views/AttachmentView.js +++ b/app/views/AttachmentView.js @@ -106,9 +106,7 @@ class AttachmentView extends React.Component { handleSave = async () => { const { attachment } = this.state; const { user, baseUrl } = this.props; - const { - title_link, image_url, image_type, video_url, video_type - } = attachment; + const { title_link, image_url, image_type, video_url, video_type } = attachment; const url = title_link || image_url || video_url; const mediaAttachment = formatAttachmentUrl(url, user.id, user.token, baseUrl);