|
|
|
@ -17,7 +17,6 @@ import kotlinx.coroutines.CoroutineScope
|
|
|
|
|
import kotlinx.coroutines.Dispatchers
|
|
|
|
|
import kotlinx.coroutines.Job
|
|
|
|
|
import kotlinx.coroutines.launch
|
|
|
|
|
import mozilla.components.browser.menu.BrowserMenu
|
|
|
|
|
import mozilla.components.browser.menu.BrowserMenuBuilder
|
|
|
|
|
import mozilla.components.browser.menu.item.SimpleBrowserMenuItem
|
|
|
|
|
import org.mozilla.fenix.R
|
|
|
|
@ -58,16 +57,9 @@ class CollectionViewHolder(
|
|
|
|
|
collection_overflow_button.run {
|
|
|
|
|
increaseTapArea(buttonIncreaseDps)
|
|
|
|
|
setOnClickListener {
|
|
|
|
|
val location = IntArray(2)
|
|
|
|
|
it.getLocationInWindow(location)
|
|
|
|
|
collectionMenu.menuBuilder
|
|
|
|
|
.build(view.context)
|
|
|
|
|
.show(
|
|
|
|
|
anchor = it,
|
|
|
|
|
orientation = if (location[1] > (rootView.measuredHeight / 2))
|
|
|
|
|
BrowserMenu.Orientation.UP else
|
|
|
|
|
BrowserMenu.Orientation.DOWN
|
|
|
|
|
)
|
|
|
|
|
.show(anchor = it)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|