1
0
Fork 0

Fixes #2533 - Adds the feature flag to the menu item to create a collection

master
Jeff Boek 2019-05-15 13:13:43 -07:00 committed by Emily Kager
parent f84b7f10dd
commit 014de10b29
1 changed files with 14 additions and 6 deletions

View File

@ -12,6 +12,7 @@ import kotlinx.android.synthetic.main.tab_header.view.*
import mozilla.components.browser.menu.BrowserMenu
import mozilla.components.browser.menu.BrowserMenuBuilder
import mozilla.components.browser.menu.item.SimpleBrowserMenuItem
import org.mozilla.fenix.BuildConfig
import org.mozilla.fenix.R
import org.mozilla.fenix.home.sessioncontrol.SessionControlAction
import org.mozilla.fenix.home.sessioncontrol.TabAction
@ -80,7 +81,11 @@ class TabHeaderViewHolder(
context.getString(R.string.tabs_menu_share_tabs)
) {
onItemTapped.invoke(Item.Share)
},
}
).let {
val list = it.toMutableList()
if (BuildConfig.COLLECTIONS_ENABLED) {
list.add(
SimpleBrowserMenuItem(
context.getString(R.string.tabs_menu_save_to_collection)
) {
@ -88,6 +93,9 @@ class TabHeaderViewHolder(
}
)
}
list
}
}
}
companion object {