Skip to content

Commit

Permalink
Remove shared multi select helper from MainActivity
Browse files Browse the repository at this point in the history
This will cause back stack issues for bottom sheet dialog fragments with multi select. That means, if a bottom sheet dialog fragment is multi selecting, then on back press, it will just dismiss the dialog rather than closing the multi-select toolbar.

This is fixed in the next commit.
  • Loading branch information
ashiagr committed Aug 31, 2023
1 parent eac4b7a commit f018992
Showing 1 changed file with 0 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ import au.com.shiftyjelly.pocketcasts.views.helper.HasBackstack
import au.com.shiftyjelly.pocketcasts.views.helper.IntentUtil
import au.com.shiftyjelly.pocketcasts.views.helper.UiUtil
import au.com.shiftyjelly.pocketcasts.views.helper.WarningsHelper
import au.com.shiftyjelly.pocketcasts.views.multiselect.MultiSelectEpisodesHelper
import com.google.android.material.bottomsheet.BottomSheetBehavior
import com.google.android.material.snackbar.Snackbar
import dagger.hilt.android.AndroidEntryPoint
Expand Down Expand Up @@ -174,7 +173,6 @@ class MainActivity :
const val PROMOCODE_REQUEST_CODE = 2
}

@Inject lateinit var multiSelectHelper: MultiSelectEpisodesHelper
@Inject lateinit var playbackManager: PlaybackManager
@Inject lateinit var podcastManager: PodcastManager
@Inject lateinit var playlistManager: PlaylistManager
Expand Down Expand Up @@ -511,11 +509,6 @@ class MainActivity :

@Suppress("DEPRECATION")
override fun onBackPressed() {
if (multiSelectHelper.isMultiSelecting) {
multiSelectHelper.isMultiSelecting = false
return
}

if (frameBottomSheetBehavior.state != BottomSheetBehavior.STATE_COLLAPSED) {
frameBottomSheetBehavior.state = BottomSheetBehavior.STATE_COLLAPSED
return
Expand Down

0 comments on commit f018992

Please sign in to comment.