Commit 0f0aee5e authored by ekager's avatar ekager Committed by Emily Kager
Browse files

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

parent 58e24b81
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -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(