Commit 5f9de1e2 authored by Bryan Kok's avatar Bryan Kok Committed by ekager
Browse files

Replace @string/tab_tray_menu_item_save with @string/tab_tray_menu_select,...

Replace @string/tab_tray_menu_item_save with @string/tab_tray_menu_select, Remove "Share all tabs" option from tab tray's private browsing menu
parent 61447149
......@@ -13,6 +13,7 @@ import org.mozilla.fenix.ext.components
class TabTrayItemMenu(
private val context: Context,
private val shouldShowShareAllTabs: () -> Boolean,
private val shouldShowSelectTabs: () -> Boolean,
private val hasOpenTabs: () -> Boolean,
private val onItemTapped: (Item) -> Unit = {}
......@@ -43,7 +44,7 @@ class TabTrayItemMenu(
) {
context.components.analytics.metrics.track(Event.TabsTrayShareAllTabsPressed)
onItemTapped.invoke(Item.ShareAllTabs)
}.apply { visible = hasOpenTabs },
}.apply { visible = { shouldShowShareAllTabs() && hasOpenTabs() } },
SimpleBrowserMenuItem(
context.getString(R.string.tab_tray_menu_tab_settings),
......
......@@ -226,6 +226,7 @@ class TabTrayView(
tabTrayItemMenu =
TabTrayItemMenu(
context = view.context,
shouldShowShareAllTabs = { checkOpenTabs.invoke() && view.tab_layout.selectedTabPosition == 0 },
shouldShowSelectTabs = { checkOpenTabs.invoke() && view.tab_layout.selectedTabPosition == 0 },
hasOpenTabs = checkOpenTabs
) {
......
......@@ -8,7 +8,7 @@
<!-- Save to collection -->
<item
android:id="@+id/tab_tray_select_to_save_menu_item"
android:title="@string/tab_tray_menu_item_save"
android:title="@string/tab_tray_menu_select"
app:showAsAction="never" />
<!-- Share-->
......
......@@ -581,6 +581,8 @@
<string name="tab_tray_title">Open Tabs</string>
<!-- Text shown in the menu for saving tabs to a collection -->
<string name="tab_tray_menu_item_save">Save to collection</string>
<!-- Text shown in the menu for the collection selector -->
<string name="tab_tray_menu_select">Select</string>
<!-- Text shown in the menu for sharing all tabs -->
<string name="tab_tray_menu_item_share">Share all tabs</string>
<!-- Text shown in the menu to view recently closed tabs -->
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment