This commit is contained in:
rebelonion 2024-02-21 23:01:11 -06:00
commit 160f783c6d
4 changed files with 50 additions and 14 deletions

View file

@ -21,7 +21,7 @@ jobs:
- name: Download last SHA artifact - name: Download last SHA artifact
uses: actions/download-artifact@v4.1.2 uses: dawidd6/action-download-artifact@v3
with: with:
workflow: beta.yml workflow: beta.yml
name: last-sha name: last-sha
@ -92,7 +92,7 @@ jobs:
shell: bash shell: bash
run: | run: |
#Discord #Discord
commit_messages=$(echo "$COMMIT_LOG" | sed 's/%0A/\n/g') commit_messages=$(echo "$COMMIT_LOG" | sed 's/%0A/\n/g; s/^/\n/')
# Truncate commit messages if they are too long # Truncate commit messages if they are too long
max_length=1900 # Adjust this value as needed max_length=1900 # Adjust this value as needed
if [ ${#commit_messages} -gt $max_length ]; then if [ ${#commit_messages} -gt $max_length ]; then
@ -104,7 +104,7 @@ jobs:
#Telegram #Telegram
curl -F "chat_id=${{ secrets.TELEGRAM_CHANNEL_ID }}" \ curl -F "chat_id=${{ secrets.TELEGRAM_CHANNEL_ID }}" \
-F "document=@app/build/outputs/apk/google/alpha/app-google-alpha.apk" \ -F "document=@app/build/outputs/apk/google/alpha/app-google-alpha.apk" \
-F "caption=Alpha-Build: ${VERSION}: ${commit_messages}" \ -F "caption=Alpha-Build: ${VERSION}: ${commit_messages}" \
https://api.telegram.org/bot${{ secrets.TELEGRAM_BOT_TOKEN }}/sendDocument https://api.telegram.org/bot${{ secrets.TELEGRAM_BOT_TOKEN }}/sendDocument
env: env:

View file

@ -61,6 +61,7 @@ import androidx.media3.exoplayer.util.EventLogger
import androidx.media3.session.MediaSession import androidx.media3.session.MediaSession
import androidx.media3.ui.* import androidx.media3.ui.*
import androidx.media3.ui.CaptionStyleCompat.* import androidx.media3.ui.CaptionStyleCompat.*
import androidx.media3.exoplayer.DefaultLoadControl
import androidx.mediarouter.app.MediaRouteButton import androidx.mediarouter.app.MediaRouteButton
import ani.dantotsu.* import ani.dantotsu.*
import ani.dantotsu.R import ani.dantotsu.R
@ -1448,10 +1449,26 @@ class ExoplayerView : AppCompatActivity(), Player.Listener, SessionAvailabilityL
private fun buildExoplayer() { private fun buildExoplayer() {
//Player //Player
val DEFAULT_MIN_BUFFER_MS = 600000
val DEFAULT_MAX_BUFFER_MS = 600000
val BUFFER_FOR_PLAYBACK_MS = 2500
val BUFFER_FOR_PLAYBACK_AFTER_REBUFFER_MS = 5000
val loadControl = DefaultLoadControl.Builder()
.setBackBuffer(1000 * 60 * 2, true)
.setBufferDurationsMs(
DEFAULT_MIN_BUFFER_MS,
DEFAULT_MAX_BUFFER_MS,
BUFFER_FOR_PLAYBACK_MS,
BUFFER_FOR_PLAYBACK_AFTER_REBUFFER_MS
)
.build()
hideSystemBars() hideSystemBars()
exoPlayer = ExoPlayer.Builder(this) exoPlayer = ExoPlayer.Builder(this)
.setMediaSourceFactory(DefaultMediaSourceFactory(cacheFactory)) .setMediaSourceFactory(DefaultMediaSourceFactory(cacheFactory))
.setTrackSelector(trackSelector) .setTrackSelector(trackSelector)
.setLoadControl(loadControl)
.build().apply { .build().apply {
playWhenReady = true playWhenReady = true
this.playbackParameters = this@ExoplayerView.playbackParameters this.playbackParameters = this@ExoplayerView.playbackParameters
@ -2032,4 +2049,4 @@ class CustomCastButton : MediaRouteButton {
true true
} }
} }
} }

View file

@ -6,9 +6,12 @@ import androidx.recyclerview.widget.LinearLayoutManager
import ani.dantotsu.R import ani.dantotsu.R
import ani.dantotsu.connections.comments.Comment import ani.dantotsu.connections.comments.Comment
import ani.dantotsu.connections.comments.CommentsAPI import ani.dantotsu.connections.comments.CommentsAPI
import ani.dantotsu.copyToClipboard
import ani.dantotsu.currActivity import ani.dantotsu.currActivity
import ani.dantotsu.databinding.ItemCommentsBinding import ani.dantotsu.databinding.ItemCommentsBinding
import ani.dantotsu.loadImage import ani.dantotsu.loadImage
import ani.dantotsu.openLinkInBrowser
import ani.dantotsu.others.ImageViewDialog
import ani.dantotsu.snackString import ani.dantotsu.snackString
import com.xwray.groupie.GroupieAdapter import com.xwray.groupie.GroupieAdapter
import com.xwray.groupie.Section import com.xwray.groupie.Section
@ -53,9 +56,11 @@ class CommentItem(val comment: Comment,
viewBinding.commentEdit.visibility = if (isUserComment) View.VISIBLE else View.GONE viewBinding.commentEdit.visibility = if (isUserComment) View.VISIBLE else View.GONE
if ((comment.replyCount ?: 0) > 0) { if ((comment.replyCount ?: 0) > 0) {
viewBinding.commentTotalReplies.visibility = View.VISIBLE viewBinding.commentTotalReplies.visibility = View.VISIBLE
viewBinding.commentRepliesDivider.visibility = View.VISIBLE
viewBinding.commentTotalReplies.text = "View ${comment.replyCount} repl${if (comment.replyCount == 1) "y" else "ies"}" viewBinding.commentTotalReplies.text = "View ${comment.replyCount} repl${if (comment.replyCount == 1) "y" else "ies"}"
} else { } else {
viewBinding.commentTotalReplies.visibility = View.GONE viewBinding.commentTotalReplies.visibility = View.GONE
viewBinding.commentRepliesDivider.visibility = View.GONE
} }
viewBinding.commentReply.visibility = View.VISIBLE viewBinding.commentReply.visibility = View.VISIBLE
viewBinding.commentTotalReplies.setOnClickListener { viewBinding.commentTotalReplies.setOnClickListener {

View file

@ -186,17 +186,31 @@
tools:ignore="ContentDescription" /> tools:ignore="ContentDescription" />
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
<LinearLayout
<TextView android:layout_width="match_parent"
android:id="@+id/commentTotalReplies"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="4dp" android:layout_gravity="center_vertical"
android:alpha="0.8" android:orientation="horizontal">
android:fontFamily="@font/poppins_semi_bold"
android:text="View replies" <View
android:textSize="12sp" android:id="@+id/commentRepliesDivider"
tools:ignore="HardcodedText" /> android:layout_width="32dp"
android:layout_height="3dp"
android:layout_gravity="center"
android:layout_marginStart="44dp"
android:background="@color/nav_tab" />
<TextView
android:id="@+id/commentTotalReplies"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="4dp"
android:alpha="0.8"
android:fontFamily="@font/poppins_semi_bold"
android:text="View replies"
android:textSize="12sp"
tools:ignore="HardcodedText" />
</LinearLayout>
<androidx.recyclerview.widget.RecyclerView <androidx.recyclerview.widget.RecyclerView
android:id="@+id/commentRepliesList" android:id="@+id/commentRepliesList"