diff --git a/deltachat-ios/Controller/Settings/NotificationsViewController.swift b/deltachat-ios/Controller/Settings/NotificationsViewController.swift
index a0c613cdb..3a6b9921c 100644
--- a/deltachat-ios/Controller/Settings/NotificationsViewController.swift
+++ b/deltachat-ios/Controller/Settings/NotificationsViewController.swift
@@ -11,7 +11,7 @@ internal final class NotificationsViewController: UITableViewController {
}
private enum CellTags: Int {
- case notifications
+ case systemSettings
}
private var dcContext: DcContext
@@ -49,13 +49,26 @@ internal final class NotificationsViewController: UITableViewController {
})
}()
+ private lazy var systemSettingsCell: UITableViewCell = {
+ let cell = UITableViewCell(style: .value1, reuseIdentifier: nil)
+ cell.tag = CellTags.systemSettings.rawValue
+ cell.textLabel?.text = String.localized("system_settings")
+ cell.accessoryType = .disclosureIndicator
+ return cell
+ }()
+
private lazy var sections: [SectionConfigs] = {
let preferencesSection = SectionConfigs(
headerTitle: nil,
footerTitle: String.localized("pref_mention_notifications_explain"),
cells: [notificationsCell, mentionsCell]
)
- return [preferencesSection]
+ let systemSettingsSection = SectionConfigs(
+ headerTitle: nil,
+ footerTitle: String.localized("system_settings_notify_explain_ios"),
+ cells: [systemSettingsCell]
+ )
+ return [preferencesSection, systemSettingsSection]
}()
init(dcAccounts: DcAccounts) {
@@ -102,6 +115,26 @@ internal final class NotificationsViewController: UITableViewController {
return sections[section].footerTitle
}
+ override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
+ guard let cell = tableView.cellForRow(at: indexPath), let cellTag = CellTags(rawValue: cell.tag) else { safe_fatalError(); return }
+ tableView.deselectRow(at: indexPath, animated: false)
+
+ switch cellTag {
+ case .systemSettings:
+ let urlString = if #available(iOS 16, *) {
+ UIApplication.openNotificationSettingsURLString
+ } else if #available(iOS 15.4, *) {
+ UIApplicationOpenNotificationSettingsURLString
+ } else {
+ UIApplication.openSettingsURLString
+ }
+
+ if let url = URL(string: urlString), UIApplication.shared.canOpenURL(url) {
+ UIApplication.shared.open(url)
+ }
+ }
+ }
+
private func updateCells() {
mentionsCell.uiSwitch.isEnabled = !dcContext.isMuted()
mentionsCell.uiSwitch.isOn = !dcContext.isMuted() && dcContext.isMentionsEnabled()
diff --git a/deltachat-ios/en.lproj/Localizable.strings b/deltachat-ios/en.lproj/Localizable.strings
index 851566ad6..2f86ea8b0 100644
--- a/deltachat-ios/en.lproj/Localizable.strings
+++ b/deltachat-ios/en.lproj/Localizable.strings
@@ -1063,3 +1063,5 @@
"backup_successful_explain_ios" = "You can find the backup in the \"Delta Chat\" folder using the \"Files\" app.\n\nMove the backup out of this folder to keep it when deleting Delta Chat.";
"location_denied" = "Location access denied";
"location_denied_explain_ios" = "In the system settings, enable \"Privacy/Location Services\" and set \"Delta Chat/Location\" to \"Always\" and \"Precise\".";
+"system_settings" = "System Settings";
+"system_settings_notify_explain_ios" = "Edit sound, type, badges and more";
diff --git a/scripts/untranslated.xml b/scripts/untranslated.xml
index 46f445091..cab72603c 100644
--- a/scripts/untranslated.xml
+++ b/scripts/untranslated.xml
@@ -7,4 +7,6 @@
You can find the backup in the \"Delta Chat\" folder using the \"Files\" app.\n\nMove the backup out of this folder to keep it when deleting Delta Chat.
Location access denied
In the system settings, enable \"Privacy/Location Services\" and set \"Delta Chat/Location\" to \"Always\" and \"Precise\".
+ System Settings
+ Edit sound, type, badges and more