mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Fix SwiftUI crash when deleting accounts
This commit is contained in:
@@ -46,7 +46,7 @@ struct SettingsView : View {
|
||||
|
||||
func buildAccountsSection() -> some View {
|
||||
Section(header: Text("ACCOUNTS").padding(.top, 22.0)) {
|
||||
ForEach(0..<viewModel.accounts.count) { index in
|
||||
ForEach(viewModel.accounts.indices, id: \.self) { index in
|
||||
NavigationLink(destination: SettingsDetailAccountView(viewModel: SettingsDetailAccountView.ViewModel(self.viewModel.accounts[index])), tag: index, selection: self.$accountAction) {
|
||||
Text(verbatim: self.viewModel.accounts[index].nameForDisplay)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user