mirror of
https://github.com/yattee/yattee.git
synced 2024-12-13 22:00:31 +05:30
Model improvements
This commit is contained in:
parent
dfe3fb81ea
commit
f5016cc961
@ -45,6 +45,8 @@ final class PlayerModel: ObservableObject {
|
||||
}
|
||||
}
|
||||
|
||||
static var shared: PlayerModel!
|
||||
|
||||
static let availableRates: [Float] = [0.5, 0.67, 0.8, 1, 1.25, 1.5, 2]
|
||||
let logger = Logger(label: "stream.yattee.app")
|
||||
|
||||
|
@ -15,8 +15,6 @@ struct VideoCell: View {
|
||||
#endif
|
||||
|
||||
@EnvironmentObject<AccountsModel> private var accounts
|
||||
@EnvironmentObject<NavigationModel> private var navigation
|
||||
@EnvironmentObject<PlayerModel> private var player
|
||||
@EnvironmentObject<RecentsModel> private var recents
|
||||
@EnvironmentObject<ThumbnailsModel> private var thumbnails
|
||||
|
||||
@ -29,6 +27,9 @@ struct VideoCell: View {
|
||||
@Default(.watchedVideoBadgeColor) private var watchedVideoBadgeColor
|
||||
@Default(.watchedVideoPlayNowBehavior) private var watchedVideoPlayNowBehavior
|
||||
|
||||
private var navigation: NavigationModel { .shared }
|
||||
private var player: PlayerModel { .shared }
|
||||
|
||||
@FetchRequest private var watchRequest: FetchedResults<Watch>
|
||||
|
||||
init(video: Video) {
|
||||
|
@ -185,6 +185,8 @@ struct YatteeApp: App {
|
||||
InstancesManifest.shared.setPublicAccount(countryOfPublicInstances!, accounts: accounts, asCurrent: accounts.current.isNil)
|
||||
}
|
||||
|
||||
PlayerModel.shared = player
|
||||
|
||||
playlists.accounts = accounts
|
||||
search.accounts = accounts
|
||||
subscriptions.accounts = accounts
|
||||
|
Loading…
Reference in New Issue
Block a user