Tweak behavior on Browse screen (#8121)
* Tweak behavior on Browse screen - Fix system back popping controller - Add behavior to system back to cancel search toolbar before clearing current search or popping controller * Review changes
This commit is contained in:
@@ -5,7 +5,6 @@ import android.os.Bundle
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.activity.OnBackPressedDispatcherOwner
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.compose.material3.SnackbarHostState
|
||||
import androidx.compose.material3.SnackbarResult
|
||||
@@ -196,17 +195,6 @@ class MangaController : FullComposeController<MangaPresenter> {
|
||||
}
|
||||
}
|
||||
|
||||
// Let Compose view handle this
|
||||
override fun handleBack(): Boolean {
|
||||
val dispatcher = (activity as? OnBackPressedDispatcherOwner)?.onBackPressedDispatcher ?: return false
|
||||
return if (dispatcher.hasEnabledCallbacks()) {
|
||||
dispatcher.onBackPressed()
|
||||
true
|
||||
} else {
|
||||
false
|
||||
}
|
||||
}
|
||||
|
||||
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup, savedViewState: Bundle?): View {
|
||||
settingsSheet = ChaptersSettingsSheet(router, presenter)
|
||||
trackSheet = TrackSheet(this, (activity as MainActivity).supportFragmentManager)
|
||||
|
||||
Reference in New Issue
Block a user