2020-07-19 02:12:32 +00:00
|
|
|
// Copyright © 2020 Metabolist. All rights reserved.
|
2020-07-19 02:06:12 +00:00
|
|
|
|
|
|
|
import SwiftUI
|
|
|
|
|
|
|
|
@main
|
|
|
|
struct MetatextApp: App {
|
2020-07-29 23:50:30 +00:00
|
|
|
private let identityDatabase: IdentityDatabase
|
|
|
|
private let secrets = Secrets(keychain: Keychain(service: "com.metabolist.metatext"))
|
|
|
|
|
|
|
|
init() {
|
|
|
|
do {
|
|
|
|
try identityDatabase = IdentityDatabase()
|
|
|
|
} catch {
|
|
|
|
fatalError("Failed to initialize identity database")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-07-19 02:06:12 +00:00
|
|
|
var body: some Scene {
|
|
|
|
WindowGroup {
|
|
|
|
ContentView()
|
2020-07-29 23:50:30 +00:00
|
|
|
.environmentObject(
|
|
|
|
SceneViewModel(
|
|
|
|
networkClient: MastodonClient(),
|
|
|
|
identityDatabase: identityDatabase,
|
|
|
|
secrets: secrets))
|
2020-07-19 02:06:12 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|