For #6846 - Don't show ToolbarPopupWindow if nothing to show
parent
58e24b81aa
commit
0f0aee5e97
|
@ -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