Fix subscriptions problems
This commit is contained in:
parent
76a1d2f4b3
commit
66428e0c34
|
@ -53,8 +53,10 @@ class ReproductorActivity : AppCompatActivity() {
|
|||
userTxt.text = this.video.username
|
||||
descriptionVideoTxt.text = this.video.description.toString()
|
||||
|
||||
// Check if user had profile image
|
||||
if(this.video.userImageUrl!="")
|
||||
Picasso.get().load("https://"+ManagerSingleton.url+this.video.userImageUrl).into(userImg)
|
||||
// Load the video
|
||||
videoView.loadUrl("https://"+ManagerSingleton.url+this.video.embedUrl)
|
||||
|
||||
|
||||
|
@ -76,7 +78,7 @@ class ReproductorActivity : AppCompatActivity() {
|
|||
}
|
||||
|
||||
private fun subscribe(){
|
||||
val account = this.video.userUuid+"@"+this.video.userHost
|
||||
val account = this.video.nameChannel+"@"+this.video.userHost
|
||||
AsyncTask.execute {
|
||||
if (Looper.myLooper() == null)
|
||||
Looper.prepare()
|
||||
|
@ -91,7 +93,7 @@ class ReproductorActivity : AppCompatActivity() {
|
|||
}
|
||||
|
||||
private fun unSubscribe(){
|
||||
val account = this.video.userUuid+"@"+this.video.userHost
|
||||
val account = this.video.nameChannel+"@"+this.video.userHost
|
||||
AsyncTask.execute {
|
||||
if (Looper.myLooper() == null)
|
||||
Looper.prepare()
|
||||
|
@ -151,7 +153,7 @@ class ReproductorActivity : AppCompatActivity() {
|
|||
}
|
||||
|
||||
private fun getSubscription(){
|
||||
val account = this.video.userUuid+"@"+this.video.userHost
|
||||
val account = this.video.nameChannel+"@"+this.video.userHost
|
||||
AsyncTask.execute {
|
||||
if (Looper.myLooper() == null)
|
||||
Looper.prepare()
|
||||
|
|
|
@ -67,6 +67,7 @@ class Videos: Client() {
|
|||
}
|
||||
"uuid" -> video.userUuid = data.nextString()
|
||||
"host" -> video.userHost = data.nextString()
|
||||
"name" -> video.nameChannel = data.nextString()
|
||||
else-> data.skipValue()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,5 +13,6 @@ class VideoModel(
|
|||
var username: String = "",
|
||||
var views: Number = 0,
|
||||
var userUuid: String = "",
|
||||
var userHost: String = ""
|
||||
var userHost: String = "",
|
||||
var nameChannel: String = ""
|
||||
):Serializable
|
Loading…
Reference in New Issue