ios: prevent crash when no email account was setup (#2375)

This commit is contained in:
Stanislav Dmitrenko
2023-05-04 13:13:53 +03:00
committed by GitHub
parent 205c74b5d8
commit 5149623b57
2 changed files with 9 additions and 5 deletions

View File

@@ -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()

View File

@@ -192,7 +192,9 @@ struct UserAddressView: View {
Section {
QRCode(uri: userAddress.connReqContact)
shareQRCodeButton(userAddress)
shareViaEmailButton(userAddress)
if MFMailComposeViewController.canSendMail() {
shareViaEmailButton(userAddress)
}
shareWithContactsButton()
autoAcceptToggle()
learnMoreButton()