mirror of
https://github.com/yattee/yattee.git
synced 2025-12-24 13:40:24 +00:00
Replace environment objects with observed objects
This commit is contained in:
@@ -12,10 +12,9 @@ struct ChannelPlaylistView: View {
|
||||
@Environment(\.colorScheme) private var colorScheme
|
||||
@Environment(\.navigationStyle) private var navigationStyle
|
||||
|
||||
@EnvironmentObject<AccountsModel> private var accounts
|
||||
@EnvironmentObject<NavigationModel> private var navigation
|
||||
@EnvironmentObject<PlayerModel> private var player
|
||||
@EnvironmentObject<RecentsModel> private var recents
|
||||
@ObservedObject private var accounts = AccountsModel.shared
|
||||
var player = PlayerModel.shared
|
||||
@ObservedObject private var recents = RecentsModel.shared
|
||||
|
||||
private var items: [ContentItem] {
|
||||
ContentItem.array(of: store.item?.videos ?? [])
|
||||
@@ -89,7 +88,7 @@ struct ChannelPlaylistView: View {
|
||||
if navigationStyle == .tab {
|
||||
Button("Done") {
|
||||
withAnimation(Constants.overlayAnimation) {
|
||||
navigation.presentingPlaylist = false
|
||||
NavigationModel.shared.presentingPlaylist = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user