Fix subscriptions problems

This commit is contained in:
ivan agosto 2019-01-30 13:03:00 -06:00
parent 76a1d2f4b3
commit 66428e0c34
3 changed files with 8 additions and 4 deletions

View File

@ -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()

View File

@ -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()
}
}

View File

@ -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