For #561 - Wires up add tab button inside the bottom bar

nightly-build-test
Jeff Boek 5 years ago committed by Sawyer Blatz
parent b16754d78a
commit 00d1be97ac

@ -262,6 +262,15 @@ class HomeFragment : Fragment() {
requireComponents.analytics.metrics.track(Event.SearchBarTapped(Event.SearchBarTapped.Source.HOME))
}
view.add_tab_button.setOnClickListener {
invokePendingDeleteJobs()
val directions = HomeFragmentDirections.actionHomeFragmentToSearchFragment(
sessionId = null,
showShortcutEnginePicker = true
)
nav(R.id.homeFragment, directions)
}
PrivateBrowsingButtonView(
privateBrowsingButton,
browsingModeManager
@ -421,14 +430,7 @@ class HomeFragment : Fragment() {
from = BrowserDirection.FromHome
)
}
is TabAction.Add -> {
invokePendingDeleteJobs()
val directions = HomeFragmentDirections.actionHomeFragmentToSearchFragment(
sessionId = null,
showShortcutEnginePicker = true
)
nav(R.id.homeFragment, directions)
}
is TabAction.ShareTabs -> {
invokePendingDeleteJobs()
val shareTabs = sessionManager

@ -74,7 +74,6 @@ typealias TabCollection = ACTabCollection
sealed class TabAction : Action {
data class SaveTabGroup(val selectedTabSessionId: String?) : TabAction()
object Add : TabAction()
object ShareTabs : TabAction()
data class CloseAll(val private: Boolean) : TabAction()
data class Select(val tabView: View, val sessionId: String) : TabAction()

Loading…
Cancel
Save