mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +00:00
Add a link to the global settings in the room notifications settings (#1433)
This commit is contained in:
+8
-1
@@ -16,7 +16,9 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
enum RoomNotificationSettingsScreenViewModelAction { }
|
||||
enum RoomNotificationSettingsScreenViewModelAction {
|
||||
case openGlobalSettings
|
||||
}
|
||||
|
||||
enum RoomNotificationSettingsState {
|
||||
case loading
|
||||
@@ -66,15 +68,20 @@ struct RoomNotificationSettingsScreenViewStateBindings {
|
||||
enum RoomNotificationSettingsScreenViewAction {
|
||||
case changedAllowCustomSettings
|
||||
case setCustomMode(RoomNotificationModeProxy)
|
||||
case customSettingFootnoteLinkTapped
|
||||
}
|
||||
|
||||
struct RoomNotificationSettingsScreenStrings {
|
||||
let customSettingFootnote: AttributedString
|
||||
let customSettingFootnoteLink: URL?
|
||||
|
||||
init() {
|
||||
customSettingFootnoteLink = URL(string: "element://openGlobalSettings")
|
||||
|
||||
let linkPlaceholder = "{link}"
|
||||
var customSettingFootnote = AttributedString(L10n.screenRoomNotificationSettingsDefaultSettingFootnote(linkPlaceholder))
|
||||
var linkString = AttributedString(L10n.screenRoomNotificationSettingsDefaultSettingFootnoteContentLink)
|
||||
linkString.link = customSettingFootnoteLink
|
||||
linkString.bold()
|
||||
customSettingFootnote.replace(linkPlaceholder, with: linkString)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user