mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-28 04:06:57 +02:00
Add translations, footer message and room encryption handling
This commit is contained in:
@@ -20,11 +20,21 @@ import Foundation
|
||||
|
||||
/// RoomNotificationSettingsViewController view state
|
||||
struct RoomNotificationSettingsViewStateImpl: RoomNotificationSettingsViewState {
|
||||
let roomEncrypted: Bool
|
||||
var saving: Bool
|
||||
var notificationState: RoomNotificationState
|
||||
var notificationOptions: [RoomNotificationState] {
|
||||
if roomEncrypted {
|
||||
return [.all, .mute]
|
||||
} else {
|
||||
return RoomNotificationState.allCases
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protocol RoomNotificationSettingsViewState {
|
||||
var saving: Bool { get }
|
||||
var roomEncrypted: Bool { get }
|
||||
var notificationOptions: [RoomNotificationState] { get }
|
||||
var notificationState: RoomNotificationState { get }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user