2
0
mirror of https://github.com/fork-maintainers/iceraven-browser synced 2024-11-19 09:25:34 +00:00
Arturo Mejia 2019-06-10 11:58:18 -04:00 committed by Colin Lee
parent db956e2445
commit 0df06b5757
2 changed files with 2 additions and 17 deletions

View File

@ -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)
}
}

View File

@ -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