move text event to its own file, improve zaps

This commit is contained in:
William Casarin
2023-02-04 09:55:16 -08:00
parent 331d7e9792
commit 9e2e8595e8
9 changed files with 173 additions and 92 deletions

View File

@@ -109,6 +109,7 @@ struct ZapButton: View {
}
Text("\(bar.zap_total > 0 ? "\(format_msats_abbrev(bar.zap_total))" : "")")
.offset(x: 22)
.font(.footnote)
.foregroundColor(bar.zapped ? Color.orange : Color.gray)
}
@@ -119,12 +120,10 @@ struct ZapButton: View {
}
/*
struct ZapButton_Previews: PreviewProvider {
static var previews: some View {
let bar = ActionBarModel.empty()
ZapButton(damus_state: test_damus_state(), event: NostrEvent(content: "hi", pubkey: "pk"), bar: bar)
let bar = ActionBarModel(likes: 0, boosts: 0, zaps: 10, zap_total: 15623414, our_like: nil, our_boost: nil, our_zap: nil)
ZapButton(damus_state: test_damus_state(), event: test_event, lnurl: "lnurl", bar: bar)
}
}
*/