Replace environment objects with observed objects

This commit is contained in:
Arkadiusz Fal
2022-11-24 21:36:05 +01:00
parent 23fa0968c6
commit 0d333b5583
102 changed files with 427 additions and 723 deletions

View File

@@ -5,7 +5,6 @@ import SwiftUI
struct WelcomeScreen: View {
@Environment(\.presentationMode) private var presentationMode
@EnvironmentObject<AccountsModel> private var accounts
@State private var store = [ManifestedInstance]()
var body: some View {
@@ -25,7 +24,7 @@ struct WelcomeScreen: View {
ForEach(countries, id: \.self) { country in
Button {
Defaults[.countryOfPublicInstances] = country
InstancesManifest.shared.setPublicAccount(country, accounts: accounts)
InstancesManifest.shared.setPublicAccount(country)
presentationMode.wrappedValue.dismiss()
} label: {