mirror of
https://github.com/fork-maintainers/iceraven-browser
synced 2024-11-19 09:25:34 +00:00
[fenix] Revert "For https://github.com/mozilla-mobile/fenix/issues/3008, For https://github.com/mozilla-mobile/fenix/issues/2162 Add Simple Logic for Menu Orientation" (https://github.com/mozilla-mobile/fenix/pull/3310)
https://github.com/mozilla-mobile/fenix/pull/3114
This commit is contained in:
parent
db956e2445
commit
0df06b5757
@ -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
Block a user