From f01899298499a3fb87929e7b1178f36f54d8c4ff Mon Sep 17 00:00:00 2001 From: ashiagr Date: Thu, 31 Aug 2023 12:33:40 +0530 Subject: [PATCH] Remove shared multi select helper from MainActivity 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. --- .../java/au/com/shiftyjelly/pocketcasts/ui/MainActivity.kt | 7 ------- 1 file changed, 7 deletions(-) diff --git a/app/src/main/java/au/com/shiftyjelly/pocketcasts/ui/MainActivity.kt b/app/src/main/java/au/com/shiftyjelly/pocketcasts/ui/MainActivity.kt index f1d56663a70..baf851b688f 100644 --- a/app/src/main/java/au/com/shiftyjelly/pocketcasts/ui/MainActivity.kt +++ b/app/src/main/java/au/com/shiftyjelly/pocketcasts/ui/MainActivity.kt @@ -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 @@ -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 @@ -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