|
|
@ -13,6 +13,8 @@ import mozilla.components.browser.menu.BrowserMenu
|
|
|
|
import mozilla.components.browser.menu.BrowserMenuBuilder
|
|
|
|
import mozilla.components.browser.menu.BrowserMenuBuilder
|
|
|
|
import mozilla.components.browser.menu.item.SimpleBrowserMenuItem
|
|
|
|
import mozilla.components.browser.menu.item.SimpleBrowserMenuItem
|
|
|
|
import org.mozilla.fenix.R
|
|
|
|
import org.mozilla.fenix.R
|
|
|
|
|
|
|
|
import org.mozilla.fenix.components.metrics.Event
|
|
|
|
|
|
|
|
import org.mozilla.fenix.ext.components
|
|
|
|
import org.mozilla.fenix.home.sessioncontrol.SessionControlAction
|
|
|
|
import org.mozilla.fenix.home.sessioncontrol.SessionControlAction
|
|
|
|
import org.mozilla.fenix.home.sessioncontrol.TabAction
|
|
|
|
import org.mozilla.fenix.home.sessioncontrol.TabAction
|
|
|
|
import org.mozilla.fenix.home.sessioncontrol.onNext
|
|
|
|
import org.mozilla.fenix.home.sessioncontrol.onNext
|
|
|
@ -29,11 +31,11 @@ class TabHeaderViewHolder(
|
|
|
|
when (it) {
|
|
|
|
when (it) {
|
|
|
|
is TabHeaderMenu.Item.Share -> actionEmitter.onNext(TabAction.ShareTabs)
|
|
|
|
is TabHeaderMenu.Item.Share -> actionEmitter.onNext(TabAction.ShareTabs)
|
|
|
|
is TabHeaderMenu.Item.CloseAll -> actionEmitter.onNext(TabAction.CloseAll(isPrivate))
|
|
|
|
is TabHeaderMenu.Item.CloseAll -> actionEmitter.onNext(TabAction.CloseAll(isPrivate))
|
|
|
|
is TabHeaderMenu.Item.SaveToCollection -> actionEmitter.onNext(
|
|
|
|
is TabHeaderMenu.Item.SaveToCollection -> {
|
|
|
|
TabAction.SaveTabGroup(
|
|
|
|
actionEmitter.onNext(TabAction.SaveTabGroup(null))
|
|
|
|
null
|
|
|
|
view.context.components.analytics.metrics
|
|
|
|
)
|
|
|
|
.track(Event.CollectionSaveButtonPressed(TELEMETRY_HOME_MENU_IDENITIFIER))
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -99,6 +101,7 @@ class TabHeaderViewHolder(
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
companion object {
|
|
|
|
companion object {
|
|
|
|
|
|
|
|
const val TELEMETRY_HOME_MENU_IDENITIFIER = "homeMenu"
|
|
|
|
const val LAYOUT_ID = R.layout.tab_header
|
|
|
|
const val LAYOUT_ID = R.layout.tab_header
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|