-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added rating logic, updated take a look button
- Loading branch information
Showing
7 changed files
with
433 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1371,7 +1371,7 @@ | |
} | ||
}, | ||
"home_import_button_title" : { | ||
"comment" : "Title of the button for importing saved languages\nImport button title", | ||
"comment" : "Import button title\nTitle of the button for importing saved languages", | ||
"localizations" : { | ||
"de" : { | ||
"stringUnit" : { | ||
|
@@ -1941,6 +1941,78 @@ | |
} | ||
} | ||
}, | ||
"rating_alert_feedbackAlertMailButton" : { | ||
"comment" : "Title of mail button", | ||
"extractionState" : "extracted_with_value", | ||
"localizations" : { | ||
"en" : { | ||
"stringUnit" : { | ||
"state" : "new", | ||
"value" : "Mail to [email protected]" | ||
} | ||
} | ||
} | ||
}, | ||
"rating_alert_feedbackAlertText" : { | ||
"comment" : "Title of feedback alert appearing when user taps no", | ||
"extractionState" : "extracted_with_value", | ||
"localizations" : { | ||
"en" : { | ||
"stringUnit" : { | ||
"state" : "new", | ||
"value" : "Please do send an short feedback email to me for any requests, bug reports, etc.\n I highly do appreciate any feedback! ❤️\nTap the button below to open your mail app." | ||
} | ||
} | ||
} | ||
}, | ||
"rating_alert_feedbackAlertTitle" : { | ||
"comment" : "Title of feedback alert appearing when user taps no", | ||
"extractionState" : "extracted_with_value", | ||
"localizations" : { | ||
"en" : { | ||
"stringUnit" : { | ||
"state" : "new", | ||
"value" : "Give Feedback" | ||
} | ||
} | ||
} | ||
}, | ||
"rating_alert_likeTheApp_title" : { | ||
"comment" : "Title of the alert asking the user whether they like the app", | ||
"extractionState" : "extracted_with_value", | ||
"localizations" : { | ||
"en" : { | ||
"stringUnit" : { | ||
"state" : "new", | ||
"value" : "Do you like the App?" | ||
} | ||
} | ||
} | ||
}, | ||
"rating_alert_likeTheAppNoButton_title" : { | ||
"comment" : "No button title", | ||
"extractionState" : "extracted_with_value", | ||
"localizations" : { | ||
"en" : { | ||
"stringUnit" : { | ||
"state" : "new", | ||
"value" : "No" | ||
} | ||
} | ||
} | ||
}, | ||
"rating_alert_likeTheAppYesButton_title" : { | ||
"comment" : "Yes button title", | ||
"extractionState" : "extracted_with_value", | ||
"localizations" : { | ||
"en" : { | ||
"stringUnit" : { | ||
"state" : "new", | ||
"value" : "Yes" | ||
} | ||
} | ||
} | ||
}, | ||
"rightAnswer" : { | ||
"extractionState" : "manual", | ||
"localizations" : { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
// | ||
// MailManager.swift | ||
// bread-timer | ||
// | ||
// Created by skrr on 24.05.20. | ||
// Copyright © 2020 mic. All rights reserved. | ||
// | ||
|
||
import MessageUI | ||
import SwiftUI | ||
|
||
//struct MailManagerViewController: UIViewControllerRepresentable { | ||
// | ||
//} | ||
|
||
final class MailManager: NSObject { | ||
static var shared = MailManager() | ||
func mailViewController() -> MFMailComposeViewController { | ||
if MFMailComposeViewController.canSendMail() { | ||
let mail = MFMailComposeViewController() | ||
mail.mailComposeDelegate = self | ||
mail.setToRecipients(["[email protected]"]) | ||
mail.setSubject("Mail from Flippy") | ||
mail.setMessageBody("<p>Hello Michael!</p><br>", isHTML: true) | ||
return mail | ||
} else { | ||
return MFMailComposeViewController(nibName: nil, bundle: nil) | ||
} | ||
} | ||
} | ||
|
||
extension MailManager: MFMailComposeViewControllerDelegate { | ||
func mailComposeController(_ controller: MFMailComposeViewController, didFinishWith result: MFMailComposeResult, error: Error?) { | ||
controller.dismiss(animated: true) | ||
} | ||
} | ||
|
||
extension MailManager: UIViewControllerRepresentable { | ||
func updateUIViewController(_ uiViewController: MFMailComposeViewController, context: Context) { | ||
return | ||
} | ||
|
||
func makeUIViewController(context: Context) -> MFMailComposeViewController { | ||
return MailManager.shared.mailViewController() | ||
} | ||
} |
Oops, something went wrong.