Skip to content

Commit

Permalink
do not update head-up notification label every time
Browse files Browse the repository at this point in the history
  • Loading branch information
flxholle committed Oct 8, 2021
1 parent 3902b65 commit 19ffa19
Showing 1 changed file with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,17 +48,19 @@ class HeadsUpTileService : WriteSecureSettingsTileService<Int>() {

override fun getIcon(value: Int): Icon {
val iconResource =
if (value == 1)
R.drawable.ic_heads_up
else
R.drawable.ic_heads_up_off
if (value == 1)
R.drawable.ic_heads_up
else
R.drawable.ic_heads_up_off

return Icon.createWithResource(applicationContext, iconResource)
}

override fun getLabel(value: Int): CharSequence {
val stringResource = R.string.heads_up
override fun updateLabel(): Boolean {
return false
}

return getString(stringResource)
override fun getLabel(value: Int): CharSequence {
return getString(R.string.heads_up)
}
}

0 comments on commit 19ffa19

Please sign in to comment.