gpui: Fix bug on `on_hover` callbacks (#46371) (cherry-pick to stable) (#46831)
zed-zippy[bot]
and
Danilo Leal
created
Cherry-pick of #46371 to stable
----
Tackling this as I noticed a bug in the agent panel where the button to
delete a thread, which appeared only on hover, stopped showing up. PRs
#43324 and #45437 fixed stuff in applying hover styles through
`.hover()` but broke the `.on_hover()` callback. Problem was that both
methods were sharing the same `element_state.hover_state` but running at
different phases. The solution here was to add a new independent state
field for the hover listener (`hover_listener_state`) while the hover
style method keeps using `hover_state`.
Release Notes:
- Agent: Fixed a bug where the button to delete a thread stopped showing
up.
Co-authored-by: Danilo Leal <67129314+danilo-leal@users.noreply.github.com>