mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Update Settings for Accounts to work with the latest SwiftUI
This commit is contained in:
@@ -10,7 +10,7 @@ import SwiftUI
|
||||
import Account
|
||||
|
||||
struct SettingsLocalAccountView : View {
|
||||
@Environment(\.isPresented) private var isPresented
|
||||
@Environment(\.presentationMode) var presentation
|
||||
@State var name: String
|
||||
|
||||
var body: some View {
|
||||
@@ -20,9 +20,7 @@ struct SettingsLocalAccountView : View {
|
||||
SettingsAccountLabelView(accountImage: "accountLocal", accountLabel: Account.defaultLocalAccountName).padding()
|
||||
) {
|
||||
HStack {
|
||||
Text("Name")
|
||||
Divider()
|
||||
TextField($name, placeholder: Text("(Optional)"))
|
||||
TextField("Name", text: $name)
|
||||
}
|
||||
}
|
||||
Section {
|
||||
@@ -47,7 +45,7 @@ struct SettingsLocalAccountView : View {
|
||||
}
|
||||
|
||||
private func dismiss() {
|
||||
isPresented?.value = false
|
||||
presentation.wrappedValue.dismiss()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user