mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +00:00
Allow the services that are configured by secrets to be disabled. (#3961)
* Make the map tiler key optional. * Make the bug report URL optional. * Make the sentry URL optional. * Make the analytics configuration optional and handle consent taking Sentry into account. * Stop prompting users to report crashes when Sentry is disabled.
This commit is contained in:
+14
-10
@@ -24,17 +24,21 @@ enum AnalyticsSettingsScreenViewAction {
|
||||
struct AnalyticsSettingsScreenStrings {
|
||||
let sectionFooter: AttributedString
|
||||
|
||||
init(termsURL: URL) {
|
||||
init(termsURL: URL?) {
|
||||
let content = AttributedString(L10n.screenAnalyticsPromptHelpUsImprove)
|
||||
|
||||
// Create the 'read terms' with a placeholder.
|
||||
let linkPlaceholder = "{link}"
|
||||
var readTerms = AttributedString(L10n.screenAnalyticsSettingsReadTerms(linkPlaceholder))
|
||||
var linkString = AttributedString(L10n.screenAnalyticsSettingsReadTermsContentLink)
|
||||
linkString.link = termsURL
|
||||
linkString.bold()
|
||||
readTerms.replace(linkPlaceholder, with: linkString)
|
||||
|
||||
sectionFooter = content + "\n\n" + readTerms
|
||||
if let termsURL {
|
||||
// Create the 'read terms' with a placeholder.
|
||||
let linkPlaceholder = "{link}"
|
||||
var readTerms = AttributedString(L10n.screenAnalyticsSettingsReadTerms(linkPlaceholder))
|
||||
var linkString = AttributedString(L10n.screenAnalyticsSettingsReadTermsContentLink)
|
||||
linkString.link = termsURL
|
||||
linkString.bold()
|
||||
readTerms.replace(linkPlaceholder, with: linkString)
|
||||
|
||||
sectionFooter = content + "\n\n" + readTerms
|
||||
} else {
|
||||
sectionFooter = content
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user