Skip to content

Commit

Permalink
Replace Enum.values() with recommended Enum.entries
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonMarquis committed Nov 10, 2024
1 parent 246c622 commit 3540e1d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ object SleepNotification {
;

companion object {
fun parse(value: String?): Action? = values().firstOrNull { it.value == value }
fun parse(value: String?): Action? = entries.firstOrNull { it.value == value }
}

fun intent(context: Context): Intent = Intent(context, SleepTileService::class.java).setAction(value)
Expand Down

0 comments on commit 3540e1d

Please sign in to comment.