parent
f7b5fc3e18
commit
5df726715f
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -176,14 +176,7 @@ class BookmarkAdapter(val emptyView: View, val actionEmitter: Observer<BookmarkA
|
|||
|
||||
bookmark_overflow.increaseTapArea(bookmarkOverflowExtraDips)
|
||||
bookmark_overflow.setOnClickListener {
|
||||
val location = IntArray(2)
|
||||
it.getLocationInWindow(location)
|
||||
bookmarkItemMenu.menuBuilder.build(containerView.context).show(
|
||||
anchor = it,
|
||||
orientation = if (location[1] > (it.rootView.measuredHeight / 2))
|
||||
BrowserMenu.Orientation.UP else
|
||||
BrowserMenu.Orientation.DOWN
|
||||
)
|
||||
bookmarkItemMenu.menuBuilder.build(containerView.context).show(anchor = it)
|
||||
}
|
||||
bookmark_title.text = if (item.title.isNullOrBlank()) item.url else item.title
|
||||
bookmark_url.text = item.url
|
||||
|
|
Loading…
Reference in New Issue