Revert "nozaps: hide zap details on notes for now"
This reverts commit b0d6d33573.
This commit is contained in:
@@ -19,11 +19,7 @@ struct EventDetailBar: View {
|
|||||||
self.target = target
|
self.target = target
|
||||||
self.target_pk = target_pk
|
self.target_pk = target_pk
|
||||||
self._bar = ObservedObject(wrappedValue: make_actionbar_model(ev: target, damus: state))
|
self._bar = ObservedObject(wrappedValue: make_actionbar_model(ev: target, damus: state))
|
||||||
}
|
|
||||||
|
|
||||||
var ZapDetails: Text {
|
|
||||||
let noun = Text(verbatim: zapsCountString(bar.zaps)).foregroundColor(.gray)
|
|
||||||
return Text("\(Text(verbatim: bar.zaps.formatted()).font(.body.bold())) \(noun)", comment: "Sentence composed of 2 variables to describe how many zap payments there are on a post. In source English, the first variable is the number of zap payments, and the second variable is 'Zap' or 'Zaps'.")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
@@ -44,11 +40,13 @@ struct EventDetailBar: View {
|
|||||||
.buttonStyle(PlainButtonStyle())
|
.buttonStyle(PlainButtonStyle())
|
||||||
}
|
}
|
||||||
|
|
||||||
if !state.settings.nozaps && bar.zaps > 0 {
|
if bar.zaps > 0 {
|
||||||
let dst = ZapsView(state: state, target: .note(id: target, author: target_pk))
|
let dst = ZapsView(state: state, target: .note(id: target, author: target_pk))
|
||||||
NavigationLink(destination: dst) {
|
NavigationLink(destination: dst) {
|
||||||
ZapDetails
|
let noun = Text(verbatim: zapsCountString(bar.zaps)).foregroundColor(.gray)
|
||||||
}.buttonStyle(PlainButtonStyle())
|
Text("\(Text(verbatim: bar.zaps.formatted()).font(.body.bold())) \(noun)", comment: "Sentence composed of 2 variables to describe how many zap payments there are on a post. In source English, the first variable is the number of zap payments, and the second variable is 'Zap' or 'Zaps'.")
|
||||||
|
}
|
||||||
|
.buttonStyle(PlainButtonStyle())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user