adding me to the footer and fixing toast text
This commit is contained in:
@@ -152,9 +152,19 @@ struct ConvoUsernames: View {
|
||||
var unknownUserCount: Int = 0
|
||||
|
||||
var body: some View {
|
||||
let userNames = self.users.map{$0.nickname ?? ""}.joined(separator: ", ")
|
||||
Text(unknownUserCount > 0 ? "\(userNames), and \(unknownUserCount) other(s)": userNames)
|
||||
.font(.footnote)
|
||||
.foregroundColor(NirvanaColor.light)
|
||||
if let userId = AuthSessionStore.getCurrentUserId() {
|
||||
let userNames = self.users.map{user in
|
||||
if user.id == userId {
|
||||
return "me"
|
||||
}
|
||||
|
||||
return user.nickname ?? ""
|
||||
}.joined(separator: ", ")
|
||||
Text(unknownUserCount > 0 ? "\(userNames), and \(unknownUserCount) other(s)": userNames)
|
||||
.foregroundColor(NirvanaColor.light)
|
||||
}
|
||||
else {
|
||||
EmptyView()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ class ConvoViewModel: NSObject, ObservableObject {
|
||||
case .connecting:
|
||||
return AlertToast(displayMode: .hud, type: .systemImage("sensor.tag.radiowaves.forward.fill", NirvanaColor.dimTeal), title: "Connecting")
|
||||
case .disconnected:
|
||||
return AlertToast(displayMode: .hud, type: .systemImage("hand.wave.fill", Color.orange), title: "disconnected")
|
||||
return AlertToast(displayMode: .hud, type: .systemImage("hand.wave.fill", Color.orange), title: "bye!")
|
||||
case .successfullyAddedThirdParty:
|
||||
return AlertToast(displayMode: .hud, type: .complete(Color.green), title: "added friend to convo")
|
||||
case .cantAddThirdParty:
|
||||
|
||||
Reference in New Issue
Block a user