There was a `when()` condition here looking at `hovered_edited_file_buttons`, which is never turned to true when hovering over the edited file button, and given we started to pass the hover styles, tooltip, and on_click handler inside the condition, they would never work. The solution here is to make these three things unconditional, so edited files are always clickable. Release Notes: - N/A
Unified · Split
| @@ -5764,7 +5764,6 @@ impl AcpServerView { · 5763 unmodified lines | ||
| 5764 | 5764 | }) |
| 5765 | 5765 | }), |
| 5766 | 5766 | ) |
| 5767 | − .child(Divider::vertical().color(DividerColor::BorderVariant)) | |
| 5768 | 5767 | .child( |
| 5769 | 5768 | Button::new(("reject-file", index), "Reject") |
| 5770 | 5769 | .label_size(LabelSize::Small) |
| @@ -5919,34 +5918,23 @@ impl AcpServerView { · 148 unmodified lines | ||
| 5919 | 5918 | ) |
| 5920 | 5919 | .label_size(LabelSize::XSmall), |
| 5921 | 5920 | ) |
| 5922 | − .when( | |
| 5923 | − match self.as_active_thread() { | |
| 5924 | − Some(thread) => { | |
| 5925 | − thread.hovered_edited_file_buttons == Some(index) | |
| 5926 | − } | |
| 5927 | − None => false, | |
| 5928 | − }, | |
| 5929 | − |this| { | |
| 5930 | − let full_path = full_path.clone(); | |
| 5931 | − this.hover(|s| s.bg(cx.theme().colors().element_hover)) | |
| 5932 | − .tooltip(move |_, cx| { | |
| 5933 | − Tooltip::with_meta( | |
| 5934 | − "Go to File", | |
| 5935 | − None, | |
| 5936 | − full_path.clone(), | |
| 5937 | − cx, | |
| 5938 | − ) | |
| 5939 | − }) | |
| 5940 | − .on_click({ | |
| 5941 | − let buffer = buffer.clone(); | |
| 5942 | − cx.listener(move |this, _, window, cx| { | |
| 5943 | − this.open_edited_buffer( | |
| 5944 | − &buffer, window, cx, | |
| 5945 | − ); | |
| 5946 | − }) | |
| 5947 | − }) | |
| 5948 | − }, | |
| 5949 | − ), | |
| 5921 | + .hover(|s| s.bg(cx.theme().colors().element_hover)) | |
| 5922 | + .tooltip({ | |
| 5923 | + move |_, cx| { | |
| 5924 | + Tooltip::with_meta( | |
| 5925 | + "Go to File", | |
| 5926 | + None, | |
| 5927 | + full_path.clone(), | |
| 5928 | + cx, | |
| 5929 | + ) | |
| 5930 | + } | |
| 5931 | + }) | |
| 5932 | + .on_click({ | |
| 5933 | + let buffer = buffer.clone(); | |
| 5934 | + cx.listener(move |this, _, window, cx| { | |
| 5935 | + this.open_edited_buffer(&buffer, window, cx); | |
| 5936 | + }) | |
| 5937 | + }), | |
| 5950 | 5938 | ) |
| 5951 | 5939 | .child(buttons); |
| 5952 | 5940 | |