mirror of
https://github.com/fork-maintainers/iceraven-browser
synced 2024-11-05 21:20:45 +00:00
For #10504 - Show tab dialog on browserfragment
This commit is contained in:
parent
90cef752b0
commit
cc6a380d45
@ -93,6 +93,7 @@ import org.mozilla.fenix.ext.requireComponents
|
||||
import org.mozilla.fenix.ext.sessionsOfType
|
||||
import org.mozilla.fenix.ext.settings
|
||||
import org.mozilla.fenix.home.SharedViewModel
|
||||
import org.mozilla.fenix.tabtray.TabTrayDialogFragment
|
||||
import org.mozilla.fenix.theme.ThemeManager
|
||||
import org.mozilla.fenix.wifi.SitePermissionsWifiIntegration
|
||||
import java.lang.ref.WeakReference
|
||||
@ -208,7 +209,11 @@ abstract class BaseBrowserFragment : Fragment(), UserInteractionHandler, Session
|
||||
scope = viewLifecycleOwner.lifecycleScope,
|
||||
tabCollectionStorage = requireComponents.core.tabCollectionStorage,
|
||||
topSiteStorage = requireComponents.core.topSiteStorage,
|
||||
sharedViewModel = sharedViewModel
|
||||
sharedViewModel = sharedViewModel,
|
||||
onTabCounterClicked = {
|
||||
val tabTrayDialog = TabTrayDialogFragment()
|
||||
tabTrayDialog.show(parentFragmentManager, null)
|
||||
}
|
||||
)
|
||||
|
||||
_browserInteractor = BrowserInteractor(
|
||||
|
@ -74,7 +74,8 @@ class DefaultBrowserToolbarController(
|
||||
private val scope: CoroutineScope,
|
||||
private val tabCollectionStorage: TabCollectionStorage,
|
||||
private val topSiteStorage: TopSiteStorage,
|
||||
private val sharedViewModel: SharedViewModel
|
||||
private val sharedViewModel: SharedViewModel,
|
||||
private val onTabCounterClicked: () -> Unit
|
||||
) : BrowserToolbarController {
|
||||
|
||||
private val currentSession
|
||||
@ -324,8 +325,9 @@ class DefaultBrowserToolbarController(
|
||||
|
||||
private fun animateTabAndNavigateHome() {
|
||||
if (activity.settings().useNewTabTray) {
|
||||
val directions = BrowserFragmentDirections.actionBrowserFragmentToTabsTrayFragment()
|
||||
navController.navigate(directions)
|
||||
// val directions = BrowserFragmentDirections.actionBrowserFragmentToTabsTrayFragment()
|
||||
// navController.navigate(directions)
|
||||
onTabCounterClicked.invoke()
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -4,7 +4,6 @@
|
||||
|
||||
package org.mozilla.fenix.tabtray
|
||||
|
||||
import android.util.Log
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
@ -52,7 +51,6 @@ class TabTrayView(
|
||||
|
||||
behavior.addBottomSheetCallback(object : BottomSheetBehavior.BottomSheetCallback() {
|
||||
override fun onSlide(bottomSheet: View, slideOffset: Float) {
|
||||
|
||||
if (slideOffset > -0.4) {
|
||||
fabView.new_tab_button.show()
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user