For #6846 - Don't show ToolbarPopupWindow if nothing to show

This commit is contained in:
ekager 2020-07-30 16:46:08 -04:00 committed by Emily Kager
parent 58e24b81aa
commit 0f0aee5e97

View File

@ -32,8 +32,11 @@ object ToolbarPopupWindow {
copyVisible: Boolean = true
) {
val context = view.get()?.context ?: return
val isCustomTabSession = customTabSession != null
val clipboard = context.components.clipboardHandler
if (!copyVisible && clipboard.text.isNullOrEmpty()) return
val isCustomTabSession = customTabSession != null
val customView = LayoutInflater.from(context)
.inflate(R.layout.browser_toolbar_popup_window, null)
val popupWindow = PopupWindow(