Fix new offenses

This commit is contained in:
Arkadiusz Fal
2021-11-08 17:29:35 +01:00
parent 2701c1ccb5
commit db9f7e5f5d
29 changed files with 305 additions and 305 deletions

View File

@@ -22,17 +22,17 @@ struct PlayerQueueView: View {
}
}
#if !os(iOS)
.padding(.vertical, 5)
.listRowInsets(EdgeInsets())
.padding(.vertical, 5)
.listRowInsets(EdgeInsets())
#endif
}
#if os(macOS)
.listStyle(.inset)
.listStyle(.inset)
#elseif os(iOS)
.listStyle(.grouped)
.listStyle(.grouped)
#else
.listStyle(.plain)
.listStyle(.plain)
#endif
}

View File

@@ -14,11 +14,11 @@ struct RelatedView: View {
}
}
#if os(macOS)
.listStyle(.inset)
.listStyle(.inset)
#elseif os(iOS)
.listStyle(.grouped)
.listStyle(.grouped)
#else
.listStyle(.plain)
.listStyle(.plain)
#endif
}
}

View File

@@ -50,7 +50,7 @@ struct VideoDetails: View {
toggleFullScreenDetailsButton
}
#if os(macOS)
.padding(.top, 10)
.padding(.top, 10)
#endif
if !video.isNil {
@@ -188,7 +188,7 @@ struct VideoDetails: View {
confirmationShown = true
}
#if os(iOS)
.tint(.gray)
.tint(.gray)
#endif
.confirmationDialog("Are you you want to unsubscribe from \(video!.channel.name)?", isPresented: $confirmationShown) {
Button("Unsubscribe") {
@@ -309,9 +309,9 @@ struct VideoDetails: View {
}
}
#if os(iOS)
.sheet(isPresented: $presentingShareSheet) {
ShareSheet(activityItems: [shareURL])
}
.sheet(isPresented: $presentingShareSheet) {
ShareSheet(activityItems: [shareURL])
}
#endif
}

View File

@@ -6,7 +6,7 @@ struct VideoDetailsPaddingModifier: ViewModifier {
#if os(macOS)
30
#else
35
40
#endif
}

View File

@@ -46,7 +46,7 @@ struct VideoPlayerSizeModifier: ViewModifier {
#if os(iOS)
verticalSizeClass == .regular ? .fit : .fill
#else
.fit
.fit
#endif
}

View File

@@ -4,7 +4,7 @@ import Siesta
import SwiftUI
struct VideoPlayerView: View {
static let defaultAspectRatio: Double = 1.77777778
static let defaultAspectRatio = 16 / 9.0
static var defaultMinimumHeightLeft: Double {
#if os(macOS)
300
@@ -76,14 +76,14 @@ struct VideoPlayerView: View {
}
}
#if os(iOS)
.onSwipeGesture(
up: {
withAnimation {
fullScreen = true
}
},
down: { dismiss() }
)
.onSwipeGesture(
up: {
withAnimation {
fullScreen = true
}
},
down: { dismiss() }
)
#endif
.background(.black)
@@ -104,7 +104,7 @@ struct VideoPlayerView: View {
#endif
}
#if os(macOS)
.frame(minWidth: 650)
.frame(minWidth: 650)
#endif
#if os(iOS)
if sidebarQueue {