fix: Redundant logout button in config view

Since there's now an easy to access button to logout of Damus on the
side bar I didn't see a need for another logout button in the config
view.

Changelog-Changed: Remove redundant logout button from settings
Closes: #378
This commit is contained in:
Jonathan Milligan
2023-01-23 00:46:57 -07:00
committed by William Casarin
parent 72f00fb413
commit 889c584487

View File

@@ -5,8 +5,8 @@
// Created by William Casarin on 2022-06-09.
//
import AVFoundation
import SwiftUI
import Kingfisher
import SwiftUI
struct ConfigView: View {
let state: DamusState
@@ -44,7 +44,6 @@ struct ConfigView: View {
var body: some View {
ZStack(alignment: .leading) {
Form {
Section(NSLocalizedString("Public Account ID", comment: "Section title for the user's public account ID.")) {
HStack {
Text(state.keypair.pubkey_bech32)
@@ -129,15 +128,11 @@ struct ConfigView: View {
}
}
Section(NSLocalizedString("Reset", comment: "Section title for resetting the user")) {
Button(NSLocalizedString("Logout", comment: "Button to logout the user.")) {
confirm_logout = true
}
if state.is_privkey_user {
Button(NSLocalizedString("Delete Account", comment: "Button to delete the user's account."), role: .destructive) {
confirm_delete_account = true
}
if state.is_privkey_user {
Section(NSLocalizedString("Delete", comment: "Section title for deleting the user")) {
Button(NSLocalizedString("Delete Account", comment: "Button to delete the user's account."), role: .destructive) {
confirm_delete_account = true
}
}
}
}