mirror of
https://github.com/libre-tube/LibreTube.git
synced 2024-12-13 22:00:30 +05:30
Merge pull request #6218 from Bnyro/master
feat: button to play recent videos from a channel
This commit is contained in:
commit
4f22fb0089
@ -181,6 +181,13 @@ class ChannelFragment : DynamicLayoutManagerFragment() {
|
||||
}.show(childFragmentManager)
|
||||
}
|
||||
|
||||
binding.playAll.setOnClickListener {
|
||||
val firstVideoId =
|
||||
response.relatedStreams.firstOrNull()?.url?.toID() ?: return@setOnClickListener
|
||||
|
||||
NavigationHelper.navigateVideo(requireContext(), firstVideoId, channelId = channelId)
|
||||
}
|
||||
|
||||
nextPages[0] = response.nextpage
|
||||
isLoading = false
|
||||
binding.channelRefresh.isRefreshing = false
|
||||
|
@ -131,6 +131,15 @@
|
||||
app:icon="@drawable/ic_add"
|
||||
tools:targetApi="m" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/play_all"
|
||||
style="@style/PlayerActionsButton"
|
||||
android:text="@string/play_latest_videos"
|
||||
android:textSize="12sp"
|
||||
android:tooltipText="@string/play_latest_videos"
|
||||
app:icon="@drawable/ic_playlist"
|
||||
tools:targetApi="m" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</HorizontalScrollView>
|
||||
|
Loading…
Reference in New Issue
Block a user