File tree Expand file tree Collapse file tree 3 files changed +6
-1
lines changed
Expand file tree Collapse file tree 3 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -11,5 +11,6 @@ pub trait Message: Clone {
1111pub trait MessageAuthor : PartialEq + Eq {
1212 fn get_display_name ( & self ) -> impl Element ;
1313 fn get_icon ( & self ) -> String ;
14+ fn get_small_icon ( & self ) -> String ;
1415 fn get_id ( & self ) -> String ;
1516}
Original file line number Diff line number Diff line change @@ -24,6 +24,10 @@ impl MessageAuthor for DiscordMessageAuthor {
2424 self . icon . clone ( )
2525 }
2626
27+ fn get_small_icon ( & self ) -> String {
28+ self . icon . clone ( ) + "?size=32"
29+ }
30+
2731 fn get_id ( & self ) -> String {
2832 self . id . clone ( )
2933 }
Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ pub fn message<M: Message>(message: MessageGroup<M>) -> impl IntoElement {
6262 . text_color ( rgb ( 0xFFFFFF ) )
6363 . gap_4 ( )
6464 . pb_6 ( )
65- . child ( img ( message. get_author ( ) . get_icon ( ) ) . flex_shrink_0 ( ) . object_fit ( gpui:: ObjectFit :: Fill ) . bg ( rgb ( 0xFFFFFF ) ) . rounded_full ( ) . w_12 ( ) . h_12 ( ) )
65+ . child ( img ( message. get_author ( ) . get_small_icon ( ) ) . flex_shrink_0 ( ) . object_fit ( gpui:: ObjectFit :: Fill ) . rounded_full ( ) . w_12 ( ) . h_12 ( ) )
6666 . child (
6767 div ( )
6868 . flex ( )
You can’t perform that action at this time.
0 commit comments