mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-19 16:13:42 +02:00
Configured and applied SwiftFormat
This commit is contained in:
committed by
Stefan Ceriu
parent
ff2e6ddfa7
commit
43c28d23b7
+5
-6
@@ -1,4 +1,4 @@
|
||||
//
|
||||
//
|
||||
// Copyright 2021 New Vector Ltd
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@@ -14,12 +14,11 @@
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
import DesignKit
|
||||
import Foundation
|
||||
|
||||
// Conformance of MXPushRule to the abstraction `NotificationPushRule` for use in `NotificationSettingsViewModel`.
|
||||
extension MXPushRule: NotificationPushRuleType {
|
||||
|
||||
/// Given a rule, check it match the actions in the static definition.
|
||||
/// - Parameter standardActions: The standard actions to match against.
|
||||
/// - Returns: Wether `this` rule matches the standard actions.
|
||||
@@ -27,7 +26,7 @@ extension MXPushRule: NotificationPushRuleType {
|
||||
guard let standardActions = standardActions else {
|
||||
return false
|
||||
}
|
||||
if !enabled && standardActions == .disabled {
|
||||
if !enabled, standardActions == .disabled {
|
||||
return true
|
||||
}
|
||||
|
||||
@@ -75,10 +74,10 @@ extension MXPushRule: NotificationPushRuleType {
|
||||
}
|
||||
|
||||
var notify: Bool {
|
||||
return getAction(actionType: MXPushRuleActionTypeNotify) != nil
|
||||
getAction(actionType: MXPushRuleActionTypeNotify) != nil
|
||||
}
|
||||
|
||||
var dontNotify: Bool {
|
||||
return getAction(actionType: MXPushRuleActionTypeDontNotify) != nil
|
||||
getAction(actionType: MXPushRuleActionTypeDontNotify) != nil
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user