mirror of
https://github.com/libre-tube/LibreTube.git
synced 2024-12-14 06:10:31 +05:30
Move back in navigation after deleting playlist
This commit is contained in:
parent
f1da5d2151
commit
d471cedd5d
@ -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