chore: Improve Chat Performance (#35)
* refactor * optimistically update message list * fix * update * handle duplicate messages * update ui * refactor input * update multi line input * clean up
This commit is contained in:
@@ -135,7 +135,7 @@ pub trait Sizable: Sized {
|
||||
|
||||
#[allow(unused)]
|
||||
pub trait StyleSized<T: Styled> {
|
||||
fn input_text_size(self, size: Size) -> Self;
|
||||
fn input_font_size(self, size: Size) -> Self;
|
||||
fn input_size(self, size: Size) -> Self;
|
||||
fn input_pl(self, size: Size) -> Self;
|
||||
fn input_pr(self, size: Size) -> Self;
|
||||
@@ -150,7 +150,7 @@ pub trait StyleSized<T: Styled> {
|
||||
}
|
||||
|
||||
impl<T: Styled> StyleSized<T> for T {
|
||||
fn input_text_size(self, size: Size) -> Self {
|
||||
fn input_font_size(self, size: Size) -> Self {
|
||||
match size {
|
||||
Size::XSmall => self.text_xs(),
|
||||
Size::Small => self.text_sm(),
|
||||
@@ -203,11 +203,11 @@ impl<T: Styled> StyleSized<T> for T {
|
||||
Size::Large => self.h_12(),
|
||||
_ => self.h(px(24.)),
|
||||
}
|
||||
.input_text_size(size)
|
||||
.input_font_size(size)
|
||||
}
|
||||
|
||||
fn list_size(self, size: Size) -> Self {
|
||||
self.list_px(size).list_py(size).input_text_size(size)
|
||||
self.list_px(size).list_py(size).input_font_size(size)
|
||||
}
|
||||
|
||||
fn list_px(self, size: Size) -> Self {
|
||||
|
||||
Reference in New Issue
Block a user