mirror of
https://github.com/element-hq/element-android
synced 2024-11-24 10:25:35 +03:00
lint
This commit is contained in:
parent
89ece22f73
commit
da993b5b58
4 changed files with 2 additions and 6 deletions
|
@ -107,7 +107,6 @@ data class PushRule(
|
|||
return (getActions().firstOrNull { it is Action.Highlight } as? Action.Highlight)?.highlight ?: false
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Set the notification status.
|
||||
*
|
||||
|
@ -141,6 +140,4 @@ data class PushRule(
|
|||
* @return true if the rule should not play sound
|
||||
*/
|
||||
fun shouldNotNotify() = actions.contains(Action.ACTION_DONT_NOTIFY)
|
||||
|
||||
companion object { }
|
||||
}
|
||||
|
|
|
@ -47,6 +47,5 @@ internal class DefaultUpdatePushRuleActionsTask @Inject constructor(
|
|||
pushRulesApi.updateRuleActions(params.kind.value, params.ruleId, body)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -56,7 +56,7 @@ class PushRulePreference : VectorPreference {
|
|||
*
|
||||
* @param pushRule
|
||||
*/
|
||||
fun setIndex(notificationIndex: NotificationIndex? ) {
|
||||
fun setIndex(notificationIndex: NotificationIndex?) {
|
||||
index = notificationIndex
|
||||
refreshSummary()
|
||||
}
|
||||
|
|
|
@ -99,7 +99,7 @@ class VectorSettingsAdvancedNotificationPreferenceFragment @Inject constructor()
|
|||
}
|
||||
|
||||
private fun ruleMatches(rule: PushRule, targetRule: PushRule): Boolean {
|
||||
//Rules match if both are disabled, or if both are enabled and their highlight/sound/notify actions match up.
|
||||
// Rules match if both are disabled, or if both are enabled and their highlight/sound/notify actions match up.
|
||||
return (!rule.enabled && !targetRule.enabled)
|
||||
|| (rule.enabled
|
||||
&& targetRule.enabled
|
||||
|
|
Loading…
Reference in a new issue