Replace environment objects with observed objects

This commit is contained in:
Arkadiusz Fal
2022-11-24 21:36:05 +01:00
parent 23fa0968c6
commit 0d333b5583
102 changed files with 427 additions and 723 deletions

View File

@@ -6,13 +6,12 @@ struct ChannelPlaylistCell: View {
@Environment(\.navigationStyle) private var navigationStyle
@EnvironmentObject<NavigationModel> private var navigation
@EnvironmentObject<RecentsModel> private var recents
var navigation = NavigationModel.shared
var body: some View {
Button {
let recent = RecentItem(from: playlist)
recents.add(recent)
RecentsModel.shared.add(recent)
navigation.presentingPlaylist = true
if navigationStyle == .sidebar {