mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-21 17:12:45 +02:00
spacing and cleanup dead code
This commit is contained in:
+2
-16
@@ -16,22 +16,10 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
enum RoomNotificationState: CaseIterable {
|
||||
case all
|
||||
case mentionsOnly
|
||||
case mute
|
||||
}
|
||||
|
||||
protocol RoomNotificationSettingsServiceType {
|
||||
final class RoomNotificationSettingsService: RoomNotificationSettingsServiceType {
|
||||
|
||||
typealias Completion = () -> Void
|
||||
typealias NotificationSettingCallback = (RoomNotificationState) -> Void
|
||||
|
||||
func observeNotificationState(listener: @escaping NotificationSettingCallback)
|
||||
func update(state: RoomNotificationState, completion: @escaping Completion)
|
||||
var notificationState: RoomNotificationState { get }
|
||||
}
|
||||
|
||||
final class RoomNotificationSettingsService: RoomNotificationSettingsServiceType {
|
||||
|
||||
// MARK: - Properties
|
||||
|
||||
@@ -74,7 +62,6 @@ final class RoomNotificationSettingsService: RoomNotificationSettingsServiceType
|
||||
observers += [ObjectIdentifier(observer)]
|
||||
}
|
||||
|
||||
|
||||
func update(state: RoomNotificationState, completion: @escaping Completion) {
|
||||
switch state {
|
||||
case .all:
|
||||
@@ -208,7 +195,6 @@ final class RoomNotificationSettingsService: RoomNotificationSettingsServiceType
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
private func removePushRule(rule: MXPushRule, completion: @escaping Completion) {
|
||||
handleUpdateCallback(completion) { [weak self] in
|
||||
guard let self = self else { return true }
|
||||
@@ -28,6 +28,7 @@ class RoomNotificationSettingsFooter: UITableViewHeaderFooterView {
|
||||
|
||||
func update(footerState: State) {
|
||||
|
||||
// Don't include link until global settings in place
|
||||
// let paragraphStyle = NSMutableParagraphStyle()
|
||||
// paragraphStyle.lineHeightMultiple = 1.16
|
||||
// let paragraphAttributes: [NSAttributedString.Key: Any] = [
|
||||
@@ -35,8 +36,6 @@ class RoomNotificationSettingsFooter: UITableViewHeaderFooterView {
|
||||
// NSAttributedString.Key.paragraphStyle: paragraphStyle,
|
||||
// NSAttributedString.Key.font: UIFont.systemFont(ofSize: 13.0)
|
||||
// ]
|
||||
|
||||
// Don't include link until global settings in place
|
||||
// let linkStr = VectorL10n.roomNotifsSettingsAccountSettings
|
||||
// let formatStr = VectorL10n.roomNotifsSettingsManageNotifications(linkStr)
|
||||
//
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
//
|
||||
// Copyright 2021 New Vector Ltd
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
protocol RoomNotificationSettingsServiceType {
|
||||
|
||||
func observeNotificationState(listener: @escaping (RoomNotificationState) -> Void)
|
||||
func update(state: RoomNotificationState, completion: @escaping () -> Void)
|
||||
var notificationState: RoomNotificationState { get }
|
||||
}
|
||||
@@ -18,7 +18,6 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
|
||||
final class RoomNotificationSettingsViewModel: RoomNotificationSettingsViewModelType {
|
||||
|
||||
// MARK: - Properties
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
//
|
||||
// Copyright 2021 New Vector Ltd
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
enum RoomNotificationState: CaseIterable {
|
||||
case all
|
||||
case mentionsOnly
|
||||
case mute
|
||||
}
|
||||
Reference in New Issue
Block a user