simplify getHighlight logic
This commit is contained in:
parent
608a1d3f8f
commit
5d092ce18a
|
@ -105,7 +105,7 @@ data class PushRule(
|
|||
* Get the highlight status. As spec mentions assume false if no tweak present.
|
||||
*/
|
||||
fun getHighlight(): Boolean {
|
||||
return (getActions().firstOrNull { it is Action.Highlight } as? Action.Highlight)?.highlight.orFalse()
|
||||
return getActions().filterIsInstance<Action.Highlight>().firstOrNull()?.highlight.orFalse()
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue