Fixes #2533 - Adds the feature flag to the menu item to create a collection
parent
f84b7f10dd
commit
014de10b29
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue