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

View File

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