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