From 89603d0ff3bd5fb7685cff0b9222d09f7bb04277 Mon Sep 17 00:00:00 2001 From: Koen Date: Wed, 27 Dec 2023 14:31:26 +0100 Subject: [PATCH] changed typeface when update is available. --- .../futo/platformplayer/views/adapters/DisabledSourceView.kt | 3 +++ .../platformplayer/views/adapters/EnabledSourceViewHolder.kt | 2 ++ 2 files changed, 5 insertions(+) diff --git a/app/src/main/java/com/futo/platformplayer/views/adapters/DisabledSourceView.kt b/app/src/main/java/com/futo/platformplayer/views/adapters/DisabledSourceView.kt index 492a4c1b..a7194ae7 100644 --- a/app/src/main/java/com/futo/platformplayer/views/adapters/DisabledSourceView.kt +++ b/app/src/main/java/com/futo/platformplayer/views/adapters/DisabledSourceView.kt @@ -36,12 +36,15 @@ class DisabledSourceView : LinearLayout { client.icon?.setImageView(_imageSource); _textSource.text = client.name; + if (client is JSClient && StatePlatform.instance.hasUpdateAvailable(client.config)) { _textSourceSubtitle.text = context.getString(R.string.update_available_exclamation) _textSourceSubtitle.setTextColor(context.getColor(R.color.light_blue_400)) + _textSourceSubtitle.typeface = resources.getFont(R.font.inter_regular) } else { _textSourceSubtitle.text = context.getString(R.string.tap_to_open) _textSourceSubtitle.setTextColor(context.getColor(R.color.gray_ac)) + _textSourceSubtitle.typeface = resources.getFont(R.font.inter_extra_light) } _buttonAdd.setOnClickListener { onAdd.emit(source) } diff --git a/app/src/main/java/com/futo/platformplayer/views/adapters/EnabledSourceViewHolder.kt b/app/src/main/java/com/futo/platformplayer/views/adapters/EnabledSourceViewHolder.kt index 315571ce..9eed743b 100644 --- a/app/src/main/java/com/futo/platformplayer/views/adapters/EnabledSourceViewHolder.kt +++ b/app/src/main/java/com/futo/platformplayer/views/adapters/EnabledSourceViewHolder.kt @@ -64,9 +64,11 @@ class EnabledSourceViewHolder : ViewHolder { if (client is JSClient && StatePlatform.instance.hasUpdateAvailable(client.config)) { _textSourceSubtitle.text = itemView.context.getString(R.string.update_available_exclamation) _textSourceSubtitle.setTextColor(itemView.context.getColor(R.color.light_blue_400)) + _textSourceSubtitle.typeface = itemView.resources.getFont(R.font.inter_regular) } else { _textSourceSubtitle.text = itemView.context.getString(R.string.tap_to_open) _textSourceSubtitle.setTextColor(itemView.context.getColor(R.color.gray_ac)) + _textSourceSubtitle.typeface = itemView.resources.getFont(R.font.inter_extra_light) } source = client