EventView: dont show pow if it's less than 10

Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
William Casarin
2022-04-16 08:30:04 -07:00
parent cdbcf0f6e0
commit 698ddb31cc

View File

@@ -42,9 +42,11 @@ struct EventView: View {
} }
.frame(maxWidth: .infinity, alignment: .leading) .frame(maxWidth: .infinity, alignment: .leading)
Spacer() Spacer()
Text("\(event.pow ?? 0)") if (event.pow ?? 0) >= 10 {
.font(.callout) Text("\(event.pow ?? 0)")
.foregroundColor(calculate_pow_color(event.pow ?? 0)) .font(.callout)
.foregroundColor(calculate_pow_color(event.pow ?? 0))
}
} }
Text(event.content) Text(event.content)
.textSelection(.enabled) .textSelection(.enabled)