From 5149623b577cdcc4a6c6c96d748d61968561682f Mon Sep 17 00:00:00 2001 From: Stanislav Dmitrenko <7953703+avently@users.noreply.github.com> Date: Thu, 4 May 2023 13:13:53 +0300 Subject: [PATCH 1/2] ios: prevent crash when no email account was setup (#2375) --- .../Shared/Views/Onboarding/CreateSimpleXAddress.swift | 10 ++++++---- .../Shared/Views/UserSettings/UserAddressView.swift | 4 +++- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/apps/ios/Shared/Views/Onboarding/CreateSimpleXAddress.swift b/apps/ios/Shared/Views/Onboarding/CreateSimpleXAddress.swift index 2cc64c193b..0962813d60 100644 --- a/apps/ios/Shared/Views/Onboarding/CreateSimpleXAddress.swift +++ b/apps/ios/Shared/Views/Onboarding/CreateSimpleXAddress.swift @@ -36,10 +36,12 @@ struct CreateSimpleXAddress: View { shareQRCodeButton(userAddress) .frame(maxWidth: .infinity) - Spacer() - - shareViaEmailButton(userAddress) - .frame(maxWidth: .infinity) + if MFMailComposeViewController.canSendMail() { + Spacer() + + shareViaEmailButton(userAddress) + .frame(maxWidth: .infinity) + } Spacer() diff --git a/apps/ios/Shared/Views/UserSettings/UserAddressView.swift b/apps/ios/Shared/Views/UserSettings/UserAddressView.swift index b8431e98e1..134eeb969b 100644 --- a/apps/ios/Shared/Views/UserSettings/UserAddressView.swift +++ b/apps/ios/Shared/Views/UserSettings/UserAddressView.swift @@ -192,7 +192,9 @@ struct UserAddressView: View { Section { QRCode(uri: userAddress.connReqContact) shareQRCodeButton(userAddress) - shareViaEmailButton(userAddress) + if MFMailComposeViewController.canSendMail() { + shareViaEmailButton(userAddress) + } shareWithContactsButton() autoAcceptToggle() learnMoreButton() From af591783189c32a2826a0e30077d4c045e5d115b Mon Sep 17 00:00:00 2001 From: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com> Date: Thu, 4 May 2023 12:45:57 +0100 Subject: [PATCH 2/2] core: 5.1.0.0 --- package.yaml | 2 +- simplex-chat.cabal | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.yaml b/package.yaml index 097cae20a2..500cf6a55f 100644 --- a/package.yaml +++ b/package.yaml @@ -1,5 +1,5 @@ name: simplex-chat -version: 5.0.0.2 +version: 5.1.0.0 #synopsis: #description: homepage: https://github.com/simplex-chat/simplex-chat#readme diff --git a/simplex-chat.cabal b/simplex-chat.cabal index 995f5c3cb6..180ba03285 100644 --- a/simplex-chat.cabal +++ b/simplex-chat.cabal @@ -5,7 +5,7 @@ cabal-version: 1.12 -- see: https://github.com/sol/hpack name: simplex-chat -version: 5.0.0.2 +version: 5.1.0.0 category: Web, System, Services, Cryptography homepage: https://github.com/simplex-chat/simplex-chat#readme author: simplex.chat