status: truncate statuses to a single line
Changelog-Fixed: Fix long status lines
This commit is contained in:
@@ -13,15 +13,17 @@ struct UserStatusView: View {
|
|||||||
@ObservedObject var status: UserStatusModel
|
@ObservedObject var status: UserStatusModel
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
VStack(alignment: .leading, spacing: 0) {
|
VStack(alignment: .leading, spacing: 2) {
|
||||||
if let general = status.general {
|
if let general = status.general {
|
||||||
Text(verbatim: "\(general.content)")
|
Text(verbatim: "\(general.content)")
|
||||||
|
.lineLimit(1)
|
||||||
.foregroundColor(.gray)
|
.foregroundColor(.gray)
|
||||||
.font(.callout.italic())
|
.font(.callout.italic())
|
||||||
}
|
}
|
||||||
|
|
||||||
if let playing = status.music {
|
if let playing = status.music {
|
||||||
Text(verbatim: "🎵\(playing.content)")
|
Text(verbatim: "🎵\(playing.content)")
|
||||||
|
.lineLimit(1)
|
||||||
.foregroundColor(.gray)
|
.foregroundColor(.gray)
|
||||||
.font(.callout.italic())
|
.font(.callout.italic())
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user