Change so that sync accounts have a Remove button instead of a Delete button. Fixes #2991

This commit is contained in:
Maurice Parker 2021-04-12 13:48:03 -05:00
parent 69bd305184
commit 3a1b3f96bb
2 changed files with 6 additions and 0 deletions

View File

@ -15,6 +15,7 @@ class AccountInspectorViewController: UITableViewController {
@IBOutlet weak var nameTextField: UITextField!
@IBOutlet weak var activeSwitch: UISwitch!
@IBOutlet weak var deleteAccountButton: VibrantButton!
var isModal = false
weak var account: Account?
@ -31,6 +32,10 @@ class AccountInspectorViewController: UITableViewController {
navigationItem.title = account.nameForDisplay
if account.type != .onMyMac {
deleteAccountButton.setTitle(NSLocalizedString("Remove Account", comment: "Remove Account"), for: .normal)
}
if isModal {
let doneBarButtonItem = UIBarButtonItem(barButtonSystemItem: .done, target: self, action: #selector(done))
navigationItem.leftBarButtonItem = doneBarButtonItem

View File

@ -153,6 +153,7 @@
<navigationItem key="navigationItem" id="Fkf-MF-Fdf"/>
<connections>
<outlet property="activeSwitch" destination="6YV-K0-yPS" id="d9M-GP-aTR"/>
<outlet property="deleteAccountButton" destination="obv-a5-Pl6" id="idW-gm-BIJ"/>
<outlet property="nameTextField" destination="LUW-uv-piz" id="e2P-Hq-guh"/>
</connections>
</tableViewController>