mirror of
https://gitlab.futo.org/videostreaming/grayjay.git
synced 2025-04-20 03:24:50 +00:00
changed typeface when update is available.
This commit is contained in:
parent
05b6cd7c97
commit
89603d0ff3
2 changed files with 5 additions and 0 deletions
|
@ -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) }
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue