chore: Improve Request Screening (#101)
* open chat while screening * close panel on ignore * bypass screening * . * improve settings * refine modal * . * . * . * . * .
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
use std::cell::Cell;
|
||||
use std::ops::{Deref, Range};
|
||||
use std::rc::Rc;
|
||||
use std::time::Duration;
|
||||
@@ -358,7 +357,7 @@ pub struct InputState {
|
||||
#[allow(clippy::type_complexity)]
|
||||
pub(super) validate: Option<Box<dyn Fn(&str) -> bool + 'static>>,
|
||||
pub(crate) scroll_handle: ScrollHandle,
|
||||
pub(super) scrollbar_state: Rc<Cell<ScrollbarState>>,
|
||||
pub(super) scrollbar_state: ScrollbarState,
|
||||
/// The size of the scrollable content.
|
||||
pub(crate) scroll_size: gpui::Size<Pixels>,
|
||||
pub(crate) line_number_width: Pixels,
|
||||
@@ -434,7 +433,7 @@ impl InputState {
|
||||
last_selected_range: None,
|
||||
last_cursor_offset: None,
|
||||
scroll_handle: ScrollHandle::new(),
|
||||
scrollbar_state: Rc::new(Cell::new(ScrollbarState::default())),
|
||||
scrollbar_state: ScrollbarState::default(),
|
||||
scroll_size: gpui::size(px(0.), px(0.)),
|
||||
line_number_width: px(0.),
|
||||
preferred_x_offset: None,
|
||||
|
||||
@@ -276,8 +276,6 @@ impl RenderOnce for TextInput {
|
||||
.children(suffix),
|
||||
)
|
||||
.when(state.is_multi_line(), |this| {
|
||||
let entity_id = self.state.entity_id();
|
||||
|
||||
if state.last_layout.is_some() {
|
||||
this.relative().child(
|
||||
div()
|
||||
@@ -287,13 +285,8 @@ impl RenderOnce for TextInput {
|
||||
.right(px(1.))
|
||||
.bottom_0()
|
||||
.child(
|
||||
Scrollbar::vertical(
|
||||
entity_id,
|
||||
state.scrollbar_state.clone(),
|
||||
state.scroll_handle.clone(),
|
||||
state.scroll_size,
|
||||
)
|
||||
.axis(ScrollbarAxis::Vertical),
|
||||
Scrollbar::vertical(&state.scrollbar_state, &state.scroll_handle)
|
||||
.axis(ScrollbarAxis::Vertical),
|
||||
),
|
||||
)
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user