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 {
11
11
pub trait MessageAuthor : PartialEq + Eq {
12
12
fn get_display_name ( & self ) -> impl Element ;
13
13
fn get_icon ( & self ) -> String ;
14
+ fn get_small_icon ( & self ) -> String ;
14
15
fn get_id ( & self ) -> String ;
15
16
}
Original file line number Diff line number Diff line change @@ -24,6 +24,10 @@ impl MessageAuthor for DiscordMessageAuthor {
24
24
self . icon . clone ( )
25
25
}
26
26
27
+ fn get_small_icon ( & self ) -> String {
28
+ self . icon . clone ( ) + "?size=32"
29
+ }
30
+
27
31
fn get_id ( & self ) -> String {
28
32
self . id . clone ( )
29
33
}
Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ pub fn message<M: Message>(message: MessageGroup<M>) -> impl IntoElement {
62
62
. text_color ( rgb ( 0xFFFFFF ) )
63
63
. gap_4 ( )
64
64
. 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 ( ) )
66
66
. child (
67
67
div ( )
68
68
. flex ( )
You can’t perform that action at this time.
0 commit comments