mirror of
https://github.com/yattee/yattee.git
synced 2024-12-22 21:43:41 +00:00
Fix crash caused by tab navigation
This commit is contained in:
parent
c6f077dcd3
commit
52ab162a6c
@ -72,34 +72,39 @@ struct AppTabNavigation: View {
|
|||||||
}
|
}
|
||||||
.tag(TabSelection.search)
|
.tag(TabSelection.search)
|
||||||
}
|
}
|
||||||
|
.id(accounts.current?.id ?? "")
|
||||||
.environment(\.navigationStyle, .tab)
|
.environment(\.navigationStyle, .tab)
|
||||||
.sheet(isPresented: $navigation.presentingChannel, onDismiss: {
|
.background(
|
||||||
if let channel = recents.presentedChannel {
|
EmptyView().sheet(isPresented: $navigation.presentingChannel, onDismiss: {
|
||||||
recents.close(RecentItem(from: channel))
|
if let channel = recents.presentedChannel {
|
||||||
}
|
recents.close(RecentItem(from: channel))
|
||||||
}) {
|
}
|
||||||
if let channel = recents.presentedChannel {
|
}) {
|
||||||
NavigationView {
|
if let channel = recents.presentedChannel {
|
||||||
ChannelVideosView(channel: channel)
|
NavigationView {
|
||||||
.environment(\.inChannelView, true)
|
ChannelVideosView(channel: channel)
|
||||||
.environment(\.inNavigationView, true)
|
.environment(\.inChannelView, true)
|
||||||
.background(playerNavigationLink)
|
.environment(\.inNavigationView, true)
|
||||||
|
.background(playerNavigationLink)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
)
|
||||||
.sheet(isPresented: $navigation.presentingPlaylist, onDismiss: {
|
.background(
|
||||||
if let playlist = recents.presentedPlaylist {
|
EmptyView().sheet(isPresented: $navigation.presentingPlaylist, onDismiss: {
|
||||||
recents.close(RecentItem(from: playlist))
|
if let playlist = recents.presentedPlaylist {
|
||||||
}
|
recents.close(RecentItem(from: playlist))
|
||||||
}) {
|
}
|
||||||
if let playlist = recents.presentedPlaylist {
|
}) {
|
||||||
NavigationView {
|
if let playlist = recents.presentedPlaylist {
|
||||||
ChannelPlaylistView(playlist: playlist)
|
NavigationView {
|
||||||
.environment(\.inNavigationView, true)
|
ChannelPlaylistView(playlist: playlist)
|
||||||
.background(playerNavigationLink)
|
.environment(\.inNavigationView, true)
|
||||||
|
.background(playerNavigationLink)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
private var subscriptionsVisible: Bool {
|
private var subscriptionsVisible: Bool {
|
||||||
|
Loading…
Reference in New Issue
Block a user