diff --git a/app/src/main/java/com/github/libretube/ui/adapters/PlaylistAdapter.kt b/app/src/main/java/com/github/libretube/ui/adapters/PlaylistAdapter.kt index 52165a551..12074e582 100644 --- a/app/src/main/java/com/github/libretube/ui/adapters/PlaylistAdapter.kt +++ b/app/src/main/java/com/github/libretube/ui/adapters/PlaylistAdapter.kt @@ -31,7 +31,7 @@ class PlaylistAdapter( private val playlistType: PlaylistType ) : RecyclerView.Adapter() { - var visibleCount = minOf(20, videoFeed.size) + private var visibleCount = minOf(20, videoFeed.size) override fun getItemCount(): Int { return when (playlistType) { diff --git a/app/src/main/java/com/github/libretube/ui/fragments/PlaylistFragment.kt b/app/src/main/java/com/github/libretube/ui/fragments/PlaylistFragment.kt index 31410a9c3..d879d872c 100644 --- a/app/src/main/java/com/github/libretube/ui/fragments/PlaylistFragment.kt +++ b/app/src/main/java/com/github/libretube/ui/fragments/PlaylistFragment.kt @@ -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 )