mirror of
https://github.com/fork-maintainers/iceraven-browser
synced 2024-11-17 15:26:23 +00:00
[fenix] For https://github.com/mozilla-mobile/fenix/issues/6846 - Don't show ToolbarPopupWindow if nothing to show
This commit is contained in:
parent
11baf289f3
commit
c84bf4ea74
@ -32,8 +32,11 @@ object ToolbarPopupWindow {
|
|||||||
copyVisible: Boolean = true
|
copyVisible: Boolean = true
|
||||||
) {
|
) {
|
||||||
val context = view.get()?.context ?: return
|
val context = view.get()?.context ?: return
|
||||||
val isCustomTabSession = customTabSession != null
|
|
||||||
val clipboard = context.components.clipboardHandler
|
val clipboard = context.components.clipboardHandler
|
||||||
|
if (!copyVisible && clipboard.text.isNullOrEmpty()) return
|
||||||
|
|
||||||
|
val isCustomTabSession = customTabSession != null
|
||||||
|
|
||||||
val customView = LayoutInflater.from(context)
|
val customView = LayoutInflater.from(context)
|
||||||
.inflate(R.layout.browser_toolbar_popup_window, null)
|
.inflate(R.layout.browser_toolbar_popup_window, null)
|
||||||
val popupWindow = PopupWindow(
|
val popupWindow = PopupWindow(
|
||||||
|
Loading…
Reference in New Issue
Block a user