[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 <reinaldonetof@hotmail.com>
Co-authored-by: Reinaldo Neto <47038980+reinaldonetof@users.noreply.github.com>
Co-authored-by: Diego Mello <diegolmello@gmail.com>
This commit is contained in:
Chris Price 2021-09-14 14:31:36 -04:00 committed by GitHub
parent b795d4b013
commit 28d7a1bab2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 4 deletions

View File

@ -110,7 +110,11 @@ export const localAuthenticate = async server => {
// if screen lock is enabled // if screen lock is enabled
if (serverRecord?.autoLock) { if (serverRecord?.autoLock) {
// Make sure splash screen has been hidden // Make sure splash screen has been hidden
await RNBootSplash.hide(); try {
await RNBootSplash.hide();
} catch {
// Do nothing
}
// Check if the app has passcode // Check if the app has passcode
const result = await checkHasPasscode({ serverRecord }); const result = await checkHasPasscode({ serverRecord });

View File

@ -106,9 +106,7 @@ class AttachmentView extends React.Component {
handleSave = async () => { handleSave = async () => {
const { attachment } = this.state; const { attachment } = this.state;
const { user, baseUrl } = this.props; const { user, baseUrl } = this.props;
const { const { title_link, image_url, image_type, video_url, video_type } = attachment;
title_link, image_url, image_type, video_url, video_type
} = attachment;
const url = title_link || image_url || video_url; const url = title_link || image_url || video_url;
const mediaAttachment = formatAttachmentUrl(url, user.id, user.token, baseUrl); const mediaAttachment = formatAttachmentUrl(url, user.id, user.token, baseUrl);