Avoid showing reboost alert for pubkey user
Closes: #337 Changelog-Fixed: Don't show report alert if logged in as a pubkey
This commit is contained in:
@@ -22,6 +22,11 @@ struct DamusState {
|
||||
var pubkey: String {
|
||||
return keypair.pubkey
|
||||
}
|
||||
|
||||
var is_privkey_user: Bool {
|
||||
keypair.privkey != nil
|
||||
}
|
||||
|
||||
|
||||
static var empty: DamusState {
|
||||
return DamusState.init(pool: RelayPool(), keypair: Keypair(pubkey: "", privkey: ""), likes: EventCounter(our_pubkey: ""), boosts: EventCounter(our_pubkey: ""), contacts: Contacts(our_pubkey: ""), tips: TipCounter(our_pubkey: ""), profiles: Profiles(), dms: DirectMessagesModel(), previews: PreviewCache())
|
||||
|
||||
@@ -41,7 +41,7 @@ struct EventActionBar: View {
|
||||
EventActionButton(img: "arrow.2.squarepath", col: bar.boosted ? Color.green : nil) {
|
||||
if bar.boosted {
|
||||
notify(.delete, bar.our_boost)
|
||||
} else {
|
||||
} else if damus_state.is_privkey_user {
|
||||
self.confirm_boost = true
|
||||
}
|
||||
}.overlay {
|
||||
|
||||
Reference in New Issue
Block a user