Fix possible crashes

This commit is contained in:
Arkadiusz Fal 2023-04-22 22:13:59 +02:00
parent 72a98314c1
commit 2d02d9b472
2 changed files with 3 additions and 1 deletions

View File

@ -51,7 +51,7 @@ extension Watch {
@NSManaged var appName: String?
@NSManaged var instanceURL: URL?
var app: VideosApp! {
var app: VideosApp? {
guard let appName else { return nil }
return .init(rawValue: appName)
}

View File

@ -32,9 +32,11 @@ struct YatteeApp: App {
@State private var configured = false
@StateObject private var accounts = AccountsModel.shared
@StateObject private var comments = CommentsModel.shared
@StateObject private var instances = InstancesModel.shared
@StateObject private var menu = MenuModel.shared
@StateObject private var navigation = NavigationModel.shared
@StateObject private var networkState = NetworkStateModel.shared
@StateObject private var player = PlayerModel.shared
@StateObject private var playlists = PlaylistsModel.shared