Add OnlyZaps Mode

Changelog-Added: Add OnlyZaps mode: disable reactions, only zaps!
This commit is contained in:
William Casarin
2023-04-20 13:40:37 -07:00
parent 209f3e8759
commit ac82f1bc09
16 changed files with 107 additions and 75 deletions
+13 -1
View File
@@ -46,6 +46,18 @@ struct EventActionBar: View {
test_lnurl ?? damus_state.profiles.lookup(id: event.pubkey)?.lnurl
}
var show_like: Bool {
if settings.onlyzaps_mode {
return false
}
guard let profile = damus_state.profiles.lookup(id: event.pubkey) else {
return true
}
return profile.reactions ?? true
}
var body: some View {
HStack {
if damus_state.keypair.privkey != nil {
@@ -75,7 +87,7 @@ struct EventActionBar: View {
.foregroundColor(bar.boosted ? Color.green : Color.gray)
}
if !settings.hide_reactions {
if show_like {
Spacer()
HStack(spacing: 4) {