Skip to content

Commit

Permalink
fix conditional binding errors (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
kenrachynski authored Jul 31, 2023
1 parent 74acb0a commit 06b2c19
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Eigen/Views/Conversation/ConversationList.swift
Original file line number Diff line number Diff line change
Expand Up @@ -87,15 +87,15 @@ struct ConversationList: View {
.listStyle(.sidebar)
.padding(.bottom, 0)
NavigationLink(destination: PreferencesView(), tag: "preferences", selection: $activeConversation) {
if let userIdSplit = matrix.session.myUser?.userId.split(separator: ":"),
let username = userIdSplit[0],
let homeserver = userIdSplit[1] {
if let userIdSplit = matrix.session.myUser?.userId.split(separator: ":") {
HStack {
UserAvatarView(user: .constant(matrix.session.myUser), height: 18, width: 18)
.environmentObject(RoomData())
HStack(spacing: 0) {
let username = userIdSplit[0]
Text(username)
.fontWeight(.medium)
let homeserver = userIdSplit[1]
Text(":" + homeserver)
.fontWeight(.light)
}
Expand Down

0 comments on commit 06b2c19

Please sign in to comment.