Removed Pill Avatar + @room is not displayed among suggestions for DM (#1968)

* removed pill avatar

* completion suggestion service shows @room as first and only if not a DM

* code improvement
This commit is contained in:
Mauro
2023-10-27 09:29:20 +02:00
committed by GitHub
parent aa766f2eac
commit 24835a566e
11 changed files with 50 additions and 55 deletions
+11 -14
View File
@@ -31,20 +31,17 @@ struct PillView: View {
}
var body: some View {
HStack(spacing: 2) {
LoadableAvatarImage(url: context.viewState.avatarURL, name: context.viewState.name, contentID: context.viewState.contentID, avatarSize: .custom(16), imageProvider: imageProvider)
Text(context.viewState.displayText)
.font(.compound.bodyLGSemibold)
.foregroundColor(textColor)
.lineLimit(1)
}
.padding(.leading, 4)
.padding(.trailing, 6)
.padding(.vertical, 1)
.background { Capsule().foregroundColor(backgroundColor) }
.onChange(of: context.viewState.displayText) { _ in
didChangeText()
}
Text(context.viewState.displayText)
.font(.compound.bodyLGSemibold)
.foregroundColor(textColor)
.lineLimit(1)
.padding(.leading, 4)
.padding(.trailing, 6)
.padding(.vertical, 1)
.background { Capsule().foregroundColor(backgroundColor) }
.onChange(of: context.viewState.displayText) { _ in
didChangeText()
}
}
}