File tree Expand file tree Collapse file tree 1 file changed +15
-13
lines changed
Swiftcord/Views/User/Avatar Expand file tree Collapse file tree 1 file changed +15
-13
lines changed Original file line number Diff line number Diff line change @@ -94,26 +94,28 @@ struct UserAvatarView: View {
9494 . tint ( . blue)
9595 }
9696
97- Text ( " Member Since " )
97+ Text ( ctx . guild ? . id . isDM == true ? " Discord Member Since " : " Member Since " )
9898 . font ( . headline)
9999 . textCase ( . uppercase)
100100 HStack ( spacing: 8 ) {
101101 Image ( " DiscordIcon " ) . resizable ( ) . aspectRatio ( contentMode: . fit) . frame ( width: 16 )
102102 Text ( user. id. createdAt? . formatted ( . dateTime. day ( ) . month ( ) . year ( ) ) ?? " Unknown " )
103103
104- Circle ( ) . fill ( Color ( nsColor: . separatorColor) ) . frame ( width: 4 , height: 4 )
105-
106- if let iconURL = ctx. guild? . properties. iconURL ( size: 32 ) , let url = URL ( string: iconURL) {
107- BetterImageView ( url: url) . frame ( width: 16 ) . clipShape ( Circle ( ) )
108- } else {
109- Text ( " \( ctx. guild? . properties. name ?? " " ) " )
110- . font ( . caption)
111- . fixedSize ( )
112- . frame ( width: 16 , height: 16 , alignment: . leading)
113- . background ( . gray. opacity ( 0.5 ) )
114- . clipShape ( Circle ( ) )
104+ if let guild = ctx. guild, !guild. id. isDM {
105+ Circle ( ) . fill ( Color ( nsColor: . separatorColor) ) . frame ( width: 4 , height: 4 )
106+
107+ if let iconURL = guild. properties. iconURL ( size: 32 ) , let url = URL ( string: iconURL) {
108+ BetterImageView ( url: url) . frame ( width: 16 ) . clipShape ( Circle ( ) )
109+ } else {
110+ Text ( " \( guild. properties. name) " )
111+ . font ( . caption)
112+ . fixedSize ( )
113+ . frame ( width: 16 , height: 16 , alignment: . leading)
114+ . background ( . gray. opacity ( 0.5 ) )
115+ . clipShape ( Circle ( ) )
116+ }
117+ Text ( member? . joined_at. formatted ( . dateTime. day ( ) . month ( ) . year ( ) ) ?? " Unknown " )
115118 }
116- Text ( member? . joined_at. formatted ( . dateTime. day ( ) . month ( ) . year ( ) ) ?? " Unknown " )
117119 }
118120
119121 if guildID != " @me " {
You can’t perform that action at this time.
0 commit comments