mirror of
https://github.com/libre-tube/LibreTube.git
synced 2024-12-14 14:20:30 +05:30
Merge pull request #3358 from Bnyro/master
Move back in navigation after deleting playlist
This commit is contained in:
commit
1288cf9f03
@ -31,7 +31,7 @@ class PlaylistAdapter(
|
||||
private val playlistType: PlaylistType
|
||||
) : RecyclerView.Adapter<PlaylistViewHolder>() {
|
||||
|
||||
var visibleCount = minOf(20, videoFeed.size)
|
||||
private var visibleCount = minOf(20, videoFeed.size)
|
||||
|
||||
override fun getItemCount(): Int {
|
||||
return when (playlistType) {
|
||||
|
@ -9,6 +9,7 @@ import androidx.core.view.updatePadding
|
||||
import androidx.fragment.app.Fragment
|
||||
import androidx.fragment.app.activityViewModels
|
||||
import androidx.lifecycle.lifecycleScope
|
||||
import androidx.navigation.fragment.findNavController
|
||||
import androidx.recyclerview.widget.ItemTouchHelper
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
@ -128,7 +129,9 @@ class PlaylistFragment : Fragment() {
|
||||
|
||||
// show playlist options
|
||||
binding.optionsMenu.setOnClickListener {
|
||||
PlaylistOptionsBottomSheet(playlistId!!, playlistName ?: "", playlistType).show(
|
||||
PlaylistOptionsBottomSheet(playlistId!!, playlistName.orEmpty(), playlistType) {
|
||||
findNavController().popBackStack()
|
||||
}.show(
|
||||
childFragmentManager,
|
||||
PlaylistOptionsBottomSheet::class.java.name
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user