feat(YT): moved back to watch section
This commit is contained in:
parent
ecbc7efebc
commit
4c4bbe3214
5 changed files with 32 additions and 29 deletions
|
@ -75,14 +75,7 @@ class MediaInfoFragment : Fragment() {
|
|||
if (media != null && !loaded) {
|
||||
loaded = true
|
||||
|
||||
//Youtube
|
||||
if (media.anime?.youtube != null && PrefManager.getVal(PrefName.ShowYtButton)) {
|
||||
binding.animeSourceYT.visibility = View.VISIBLE
|
||||
binding.animeSourceYT.setOnClickListener {
|
||||
val intent = Intent(Intent.ACTION_VIEW, Uri.parse(media.anime.youtube))
|
||||
requireContext().startActivity(intent)
|
||||
}
|
||||
}
|
||||
|
||||
binding.mediaInfoProgressBar.visibility = View.GONE
|
||||
binding.mediaInfoContainer.visibility = View.VISIBLE
|
||||
binding.mediaInfoName.text = "\t\t\t" + (media.name ?: media.nameRomaji)
|
||||
|
|
|
@ -2,6 +2,7 @@ package ani.dantotsu.media.anime
|
|||
|
||||
import android.annotation.SuppressLint
|
||||
import android.content.Intent
|
||||
import android.net.Uri
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import ani.dantotsu.settings.FAQActivity
|
||||
|
@ -67,7 +68,14 @@ class AnimeWatchAdapter(
|
|||
null
|
||||
)
|
||||
}
|
||||
|
||||
//Youtube
|
||||
if (media.anime?.youtube != null && PrefManager.getVal(PrefName.ShowYtButton)) {
|
||||
binding.animeSourceYT.visibility = View.VISIBLE
|
||||
binding.animeSourceYT.setOnClickListener {
|
||||
val intent = Intent(Intent.ACTION_VIEW, Uri.parse(media.anime.youtube))
|
||||
fragment.requireContext().startActivity(intent)
|
||||
}
|
||||
}
|
||||
binding.animeSourceDubbed.isChecked = media.selected!!.preferDub
|
||||
binding.animeSourceDubbedText.text =
|
||||
if (media.selected!!.preferDub) currActivity()!!.getString(R.string.dubbed) else currActivity()!!.getString(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue