1
0
Fork 0

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

master
Jeff Boek 2019-09-20 12:13:54 -07:00 committed by Sawyer Blatz
parent b16754d78a
commit 00d1be97ac
2 changed files with 10 additions and 9 deletions

View File

@ -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

View File

@ -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()