From 19ffa19b0f2cefe03de4c18d865024c2f1d0e8b4 Mon Sep 17 00:00:00 2001 From: asdoi Date: Fri, 8 Oct 2021 23:45:01 +0200 Subject: [PATCH] do not update head-up notification label every time --- .../quicksettings/tiles/HeadsUpTileService.kt | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/app/src/main/java/com/asdoi/quicksettings/tiles/HeadsUpTileService.kt b/app/src/main/java/com/asdoi/quicksettings/tiles/HeadsUpTileService.kt index a9e8901..979a12b 100644 --- a/app/src/main/java/com/asdoi/quicksettings/tiles/HeadsUpTileService.kt +++ b/app/src/main/java/com/asdoi/quicksettings/tiles/HeadsUpTileService.kt @@ -48,17 +48,19 @@ class HeadsUpTileService : WriteSecureSettingsTileService() { 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) } } \ No newline at end of file