Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move back in navigation after deleting playlist #3358

Merged
merged 1 commit into from
Mar 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
)
Expand Down