Update function name to the correct one
This commit is contained in:
parent
0d9bd5410a
commit
eeb20f1f9d
@ -1,8 +1,6 @@
|
|||||||
package org.libre.agosto.p2play
|
package org.libre.agosto.p2play
|
||||||
|
|
||||||
import android.annotation.SuppressLint
|
import android.annotation.SuppressLint
|
||||||
import android.app.Activity
|
|
||||||
import android.content.DialogInterface
|
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.content.pm.ActivityInfo
|
import android.content.pm.ActivityInfo
|
||||||
import android.graphics.Bitmap
|
import android.graphics.Bitmap
|
||||||
@ -96,7 +94,7 @@ class ReproductorActivity : AppCompatActivity() {
|
|||||||
|
|
||||||
userImg.setOnClickListener {
|
userImg.setOnClickListener {
|
||||||
val intent = Intent(this, ChannelActivity::class.java)
|
val intent = Intent(this, ChannelActivity::class.java)
|
||||||
intent.putExtra("channel", video.getAccount())
|
intent.putExtra("channel", video.getChannel())
|
||||||
startActivity(intent)
|
startActivity(intent)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -105,7 +103,7 @@ class ReproductorActivity : AppCompatActivity() {
|
|||||||
AsyncTask.execute {
|
AsyncTask.execute {
|
||||||
if (Looper.myLooper() == null)
|
if (Looper.myLooper() == null)
|
||||||
Looper.prepare()
|
Looper.prepare()
|
||||||
val res = this._actions.subscribe(ManagerSingleton.token.token, video.getAccount())
|
val res = this._actions.subscribe(ManagerSingleton.token.token, video.getChannel())
|
||||||
if (res == 1) {
|
if (res == 1) {
|
||||||
runOnUiThread {
|
runOnUiThread {
|
||||||
ManagerSingleton.Toast(getString(R.string.subscribeMsg), this)
|
ManagerSingleton.Toast(getString(R.string.subscribeMsg), this)
|
||||||
@ -119,7 +117,7 @@ class ReproductorActivity : AppCompatActivity() {
|
|||||||
AsyncTask.execute {
|
AsyncTask.execute {
|
||||||
if (Looper.myLooper() == null)
|
if (Looper.myLooper() == null)
|
||||||
Looper.prepare()
|
Looper.prepare()
|
||||||
val res = this._actions.unSubscribe(ManagerSingleton.token.token, video.getAccount())
|
val res = this._actions.unSubscribe(ManagerSingleton.token.token, video.getChannel())
|
||||||
if (res == 1) {
|
if (res == 1) {
|
||||||
runOnUiThread {
|
runOnUiThread {
|
||||||
ManagerSingleton.Toast(getString(R.string.unSubscribeMsg), this)
|
ManagerSingleton.Toast(getString(R.string.unSubscribeMsg), this)
|
||||||
|
@ -66,7 +66,7 @@ class VideosAdapter(private val myDataset: ArrayList<VideoModel>) :
|
|||||||
|
|
||||||
holder.userImg.setOnClickListener {
|
holder.userImg.setOnClickListener {
|
||||||
val intent = Intent(holder.context, ChannelActivity::class.java)
|
val intent = Intent(holder.context, ChannelActivity::class.java)
|
||||||
intent.putExtra("channel", myDataset[position].getAccount())
|
intent.putExtra("channel", myDataset[position].getChannel())
|
||||||
holder.context.startActivity(intent)
|
holder.context.startActivity(intent)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -10,8 +10,6 @@ import java.net.HttpURLConnection
|
|||||||
import java.net.URL
|
import java.net.URL
|
||||||
|
|
||||||
open class Client {
|
open class Client {
|
||||||
|
|
||||||
|
|
||||||
protected fun _newCon(uri: String, method: String, token: String = ""): HttpURLConnection {
|
protected fun _newCon(uri: String, method: String, token: String = ""): HttpURLConnection {
|
||||||
val url = URL("https://${ManagerSingleton.url}/api/v1/$uri")
|
val url = URL("https://${ManagerSingleton.url}/api/v1/$uri")
|
||||||
val con = url.openConnection() as HttpURLConnection
|
val con = url.openConnection() as HttpURLConnection
|
||||||
@ -67,5 +65,4 @@ open class Client {
|
|||||||
return keys
|
return keys
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
@ -19,7 +19,7 @@ class VideoModel(
|
|||||||
var userHost: String = "",
|
var userHost: String = "",
|
||||||
var nameChannel: String = ""
|
var nameChannel: String = ""
|
||||||
):Serializable {
|
):Serializable {
|
||||||
fun getAccount(): String {
|
fun getChannel(): String {
|
||||||
return "$nameChannel@$userHost"
|
return "$nameChannel@$userHost"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user