Improve URL handling

This commit is contained in:
Arkadiusz Fal
2022-06-25 00:48:57 +02:00
parent 321c265a11
commit f3f8466a95
26 changed files with 616 additions and 216 deletions

View File

@@ -15,6 +15,7 @@ struct BrowserPlayerControls<Content: View, Toolbar: View>: View {
@ViewBuilder content: @escaping () -> Content
) {
self.content = content()
toolbar()
}
init(

View File

@@ -17,8 +17,7 @@ struct ChannelCell: View {
channel,
player: player,
recents: recents,
navigation: navigation,
navigationStyle: navigationStyle
navigation: navigation
)
} label: {
content

View File

@@ -8,8 +8,6 @@ struct ControlsBar: View {
case details, controls
}
@Environment(\.navigationStyle) private var navigationStyle
@EnvironmentObject<AccountsModel> private var accounts
@EnvironmentObject<NavigationModel> private var navigation
@EnvironmentObject<PlayerControlsModel> private var playerControls
@@ -36,7 +34,7 @@ struct ControlsBar: View {
.padding(.horizontal)
.frame(minWidth: 0, maxWidth: .infinity, minHeight: 0, maxHeight: barHeight)
.borderTop(height: 0.4, color: Color("ControlsBorderColor"))
.borderBottom(height: navigationStyle == .sidebar ? 0 : 0.4, color: Color("ControlsBorderColor"))
.borderBottom(height: 0.4, color: Color("ControlsBorderColor"))
.modifier(ControlBackgroundModifier(edgesIgnoringSafeArea: .bottom))
}
@@ -153,8 +151,7 @@ struct ControlsBar: View {
video.channel,
player: model,
recents: recents,
navigation: navigation,
navigationStyle: navigationStyle
navigation: navigation
)
} label: {
Label("\(video.author) Channel", systemImage: "rectangle.stack.fill.badge.person.crop")

View File

@@ -191,8 +191,7 @@ struct VideoContextMenuView: View {
video.channel,
player: player,
recents: recents,
navigation: navigation,
navigationStyle: navigationStyle
navigation: navigation
)
} label: {
Label("\(video.author) Channel", systemImage: "rectangle.stack.fill.badge.person.crop")