Browse Source

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

Signed-off-by: William Casarin <jb55@jb55.com>
profiles-everywhere
William Casarin 3 years ago
parent
commit
698ddb31cc
  1. 8
      damus/Views/EventView.swift

8
damus/Views/EventView.swift

@ -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)

Loading…
Cancel
Save