* For https://github.com/mozilla-mobile/fenix/issues/3731 Changed order of items for a collection's overflow menu

* For https://github.com/mozilla-mobile/fenix/issues/3731 Changed the order tabs open to keep same order from collections
pull/600/head
Mihai Adrian 5 years ago committed by Sawyer Blatz
parent f7983c0384
commit dfc03d4580

@ -532,7 +532,7 @@ class HomeFragment : Fragment(), AccountObserver {
val context = requireContext()
val components = context.components
action.collection.tabs.forEach {
action.collection.tabs.reversed().forEach {
val session = it.restore(
context = context,
engine = components.core.engine,

@ -132,25 +132,28 @@ class CollectionItemMenu(
private val menuItems by lazy {
listOf(
SimpleBrowserMenuItem(
context.getString(R.string.collection_delete),
textColorResource = ThemeManager.resolveAttribute(R.attr.destructive, context)
context.getString(R.string.collection_open_tabs)
) {
onItemTapped.invoke(Item.DeleteCollection)
onItemTapped.invoke(Item.OpenTabs)
},
SimpleBrowserMenuItem(
context.getString(R.string.add_tab)
) {
onItemTapped.invoke(Item.AddTab)
}.apply { visible = { sessionHasOpenTabs } },
SimpleBrowserMenuItem(
context.getString(R.string.collection_rename)
) {
onItemTapped.invoke(Item.RenameCollection)
},
SimpleBrowserMenuItem(
context.getString(R.string.collection_open_tabs)
context.getString(R.string.add_tab)
) {
onItemTapped.invoke(Item.OpenTabs)
onItemTapped.invoke(Item.AddTab)
}.apply { visible = { sessionHasOpenTabs } },
SimpleBrowserMenuItem(
context.getString(R.string.collection_delete),
textColorResource = ThemeManager.resolveAttribute(R.attr.destructive, context)
) {
onItemTapped.invoke(Item.DeleteCollection)
}
)
}

Loading…
Cancel
Save