mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-25 11:02:48 +02:00
Fix build, mute bug and footer label on unencrypted builds
This commit is contained in:
@@ -19,7 +19,6 @@ import Foundation
|
||||
final class RoomNotificationSettingsService: RoomNotificationSettingsServiceType {
|
||||
|
||||
typealias Completion = () -> Void
|
||||
typealias NotificationSettingCallback = (RoomNotificationState) -> Void
|
||||
|
||||
// MARK: - Properties
|
||||
|
||||
@@ -50,7 +49,7 @@ final class RoomNotificationSettingsService: RoomNotificationSettingsServiceType
|
||||
|
||||
// MARK: - Public
|
||||
|
||||
func observeNotificationState(listener: @escaping NotificationSettingCallback) {
|
||||
func observeNotificationState(listener: @escaping RoomNotificationStateCallback) {
|
||||
|
||||
let observer = NotificationCenter.default.addObserver(
|
||||
forName: NSNotification.Name(rawValue: kMXNotificationCenterDidUpdateRules),
|
||||
@@ -81,7 +80,7 @@ final class RoomNotificationSettingsService: RoomNotificationSettingsServiceType
|
||||
return
|
||||
}
|
||||
|
||||
if let rule = room.roomPushRule, room.isMentionsOnly {
|
||||
if let rule = room.roomPushRule {
|
||||
removePushRule(rule: rule) {
|
||||
self.mute(completion: completion)
|
||||
}
|
||||
|
||||
@@ -43,9 +43,9 @@ class RoomNotificationSettingsFooter: UITableViewHeaderFooterView {
|
||||
// let footer0 = NSMutableAttributedString(string: formattedStr, attributes: paragraphAttributes)
|
||||
// let linkRange = (footer0.string as NSString).range(of: linkStr)
|
||||
// footer0.addAttribute(NSAttributedString.Key.link, value: Constants.linkToAccountSettings, range: linkRange)
|
||||
if footerState.showEncryptedNotice {
|
||||
label.text = VectorL10n.roomNotifsSettingsEncryptedRoomNotice
|
||||
}
|
||||
|
||||
label.text = footerState.showEncryptedNotice ? VectorL10n.roomNotifsSettingsEncryptedRoomNotice : nil
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -16,9 +16,12 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
typealias UpdateRoomNotificationStateCompletion = () -> Void
|
||||
typealias RoomNotificationStateCallback = (RoomNotificationState) -> Void
|
||||
|
||||
protocol RoomNotificationSettingsServiceType {
|
||||
|
||||
func observeNotificationState(listener: @escaping (RoomNotificationState) -> Void)
|
||||
func update(state: RoomNotificationState, completion: @escaping () -> Void)
|
||||
func observeNotificationState(listener: @escaping RoomNotificationStateCallback)
|
||||
func update(state: RoomNotificationState, completion: @escaping UpdateRoomNotificationStateCompletion)
|
||||
var notificationState: RoomNotificationState { get }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user