Files
Nextcloud-Cookbook-iOS/Nextcloud Cookbook iOS Client/Nextcloud_Cookbook_iOS_ClientApp.swift
VincentMeilinger 744ea76a34 Updated RecipeView
2024-03-01 14:17:24 +01:00

35 lines
893 B
Swift

//
// Nextcloud_Cookbook_iOS_ClientApp.swift
// Nextcloud Cookbook iOS Client
//
// Created by Vincent Meilinger on 06.09.23.
//
import SwiftUI
import SwiftUI
@main
struct Nextcloud_Cookbook_iOS_ClientApp: App {
@AppStorage("onboarding") var onboarding = true
@AppStorage("language") var language = Locale.current.language.languageCode?.identifier ?? "en"
var body: some Scene {
WindowGroup {
ZStack {
if onboarding {
OnboardingView()
} else {
MainView()
}
}
.transition(.slide)
.environment(
\.locale,
.init(identifier: language ==
SupportedLanguage.DEVICE.rawValue ? (Locale.current.language.languageCode?.identifier ?? "en") : language)
)
}
}
}