mirror of
https://github.com/libre-tube/LibreTube.git
synced 2025-04-29 16:30:31 +05:30
commit
8c5a34861c
@ -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)
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
}
|
}
|
||||||
|
@ -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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user