Merge pull request #168 from lilcheti/master

unsub color change
This commit is contained in:
Farbod 2022-05-05 17:26:10 +04:30 committed by GitHub
commit 8c5a34861c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 8 deletions

View File

@ -116,17 +116,17 @@ class ChannelFragment : Fragment() {
colorPrimary,
true)
val ColorText = TypedValue()
val colorText = TypedValue()
(context as Activity).theme.resolveAttribute(
R.attr.colorOnSurface,
ColorText,
colorText,
true)
runOnUiThread {
if (response.subscribed==true){
isSubscribed=true
button.text=getString(R.string.unsubscribe)
button.setTextColor(ColorText.data)
button.setTextColor(colorText.data)
}
if(response.subscribed!=null){
@ -140,7 +140,7 @@ class ChannelFragment : Fragment() {
}else{
subscribe()
button.text=getString(R.string.unsubscribe)
button.setTextColor(ColorText.data)
button.setTextColor(colorText.data)
}
}}
}

View File

@ -651,10 +651,10 @@ class PlayerFragment : Fragment() {
true
)
val ColorText = TypedValue()
val colorText = TypedValue()
(context as Activity).theme.resolveAttribute(
R.attr.colorOnSurface,
ColorText,
colorText,
true
)
@ -662,7 +662,7 @@ class PlayerFragment : Fragment() {
if (response.subscribed == true) {
isSubscribed = true
button.text = getString(R.string.unsubscribe)
button.setTextColor(ColorText.data)
button.setTextColor(colorText.data)
}
if (response.subscribed != null) {
button.setOnClickListener {
@ -673,7 +673,7 @@ class PlayerFragment : Fragment() {
} else {
subscribe(channel_id)
button.text = getString(R.string.unsubscribe)
button.setTextColor(colorPrimary.data)
button.setTextColor(colorText.data)
}
}
}