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
2
.github/workflows/beta.yml
vendored
2
.github/workflows/beta.yml
vendored
|
@ -39,7 +39,7 @@ jobs:
|
|||
fi
|
||||
echo "Commits since $LAST_SHA:"
|
||||
# Accumulate commit logs in a shell variable
|
||||
COMMIT_LOGS=$(git log $LAST_SHA..HEAD --pretty=format:"● %s")
|
||||
COMMIT_LOGS=$(git log $LAST_SHA..HEAD --pretty=format:"● %s ~%an")
|
||||
# URL-encode the newline characters for GitHub Actions
|
||||
COMMIT_LOGS="${COMMIT_LOGS//'%'/'%25'}"
|
||||
COMMIT_LOGS="${COMMIT_LOGS//$'\n'/'%0A'}"
|
||||
|
|
|
@ -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(
|
||||
|
|
|
@ -42,25 +42,7 @@
|
|||
android:visibility="gone"
|
||||
tools:visibility="visible">
|
||||
|
||||
<Button
|
||||
android:id="@+id/animeSourceYT"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:layout_marginEnd="32dp"
|
||||
android:layout_marginStart="32dp"
|
||||
android:backgroundTint="@color/yt_red"
|
||||
android:fontFamily="@font/poppins_bold"
|
||||
android:insetTop="0dp"
|
||||
android:insetBottom="0dp"
|
||||
android:text="@string/play_yt"
|
||||
android:textColor="@color/bg_white"
|
||||
android:visibility="gone"
|
||||
app:cornerRadius="12dp"
|
||||
app:icon="@drawable/ic_round_play_circle_24"
|
||||
app:iconTint="@color/bg_white"
|
||||
tools:ignore="TextContrastCheck"
|
||||
tools:visibility="visible"/>
|
||||
|
||||
|
||||
<TableLayout
|
||||
android:layout_width="match_parent"
|
||||
|
|
|
@ -19,6 +19,26 @@
|
|||
android:orientation="vertical"
|
||||
android:padding="32dp">
|
||||
|
||||
<Button
|
||||
android:id="@+id/animeSourceYT"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:layout_marginEnd="32dp"
|
||||
android:layout_marginStart="32dp"
|
||||
android:backgroundTint="@color/yt_red"
|
||||
android:fontFamily="@font/poppins_bold"
|
||||
android:insetTop="0dp"
|
||||
android:insetBottom="0dp"
|
||||
android:text="@string/play_yt"
|
||||
android:textColor="@color/bg_white"
|
||||
android:visibility="gone"
|
||||
app:cornerRadius="12dp"
|
||||
app:icon="@drawable/ic_round_play_circle_24"
|
||||
app:iconTint="@color/bg_white"
|
||||
tools:ignore="TextContrastCheck"
|
||||
tools:visibility="visible"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/animeSourceTitle"
|
||||
android:layout_width="match_parent"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue