Fix default alignment swiftlint offense

This commit is contained in:
Arkadiusz Fal 2022-11-25 19:31:48 +01:00
parent 84e50ddd25
commit 53620c4d35
14 changed files with 17 additions and 17 deletions

View File

@ -13,7 +13,7 @@ struct HistoryView: View {
var body: some View { var body: some View {
LazyVStack { LazyVStack {
if visibleWatches.isEmpty { if visibleWatches.isEmpty {
VStack(alignment: .center, spacing: 20) { VStack(spacing: 20) {
HStack { HStack {
Image(systemName: "clock") Image(systemName: "clock")
Text("Playback history is empty") Text("Playback history is empty")

View File

@ -43,7 +43,7 @@ struct AppSidebarNavigation: View {
VStack { VStack {
BrowserPlayerControls { BrowserPlayerControls {
HStack(alignment: .center) { HStack {
Spacer() Spacer()
Image(systemName: "4k.tv") Image(systemName: "4k.tv")
.renderingMode(.original) .renderingMode(.original)

View File

@ -57,7 +57,7 @@ struct PlayerControls: View {
#endif #endif
VStack { VStack {
ZStack(alignment: .center) { ZStack {
VStack(spacing: 0) { VStack(spacing: 0) {
ZStack { ZStack {
OpeningStream() OpeningStream()

View File

@ -127,7 +127,7 @@ struct TimelineView: View {
.modifier(ControlBackgroundModifier()) .modifier(ControlBackgroundModifier())
.clipShape(RoundedRectangle(cornerRadius: 4)) .clipShape(RoundedRectangle(cornerRadius: 4))
ZStack(alignment: .center) { ZStack {
ZStack(alignment: .leading) { ZStack(alignment: .leading) {
ZStack(alignment: .leading) { ZStack(alignment: .leading) {
Rectangle() Rectangle()

View File

@ -19,7 +19,7 @@ struct CommentView: View {
var body: some View { var body: some View {
VStack(alignment: .leading) { VStack(alignment: .leading) {
HStack(alignment: .center, spacing: 10) { HStack(spacing: 10) {
HStack(spacing: 10) { HStack(spacing: 10) {
ZStack(alignment: .bottomTrailing) { ZStack(alignment: .bottomTrailing) {
authorAvatar authorAvatar

View File

@ -53,7 +53,7 @@ struct VideoDetails: View {
.frame(maxWidth: detailsSize.width) .frame(maxWidth: detailsSize.width)
.transition(.fade) .transition(.fade)
HStack(alignment: .center) { HStack {
if detailsToolbarPosition.needsLeftSpacer { Spacer() } if detailsToolbarPosition.needsLeftSpacer { Spacer() }
VideoDetailsToolbar(video: video, page: $page, sidebarQueue: sidebarQueue) VideoDetailsToolbar(video: video, page: $page, sidebarQueue: sidebarQueue)

View File

@ -67,7 +67,7 @@ struct AddToPlaylistView: View {
} }
private var header: some View { private var header: some View {
HStack(alignment: .center) { HStack {
Text("Add to Playlist") Text("Add to Playlist")
.font(.title2.bold()) .font(.title2.bold())

View File

@ -27,7 +27,7 @@ struct PlaylistFormView: View {
Group { Group {
#if os(macOS) || os(iOS) #if os(macOS) || os(iOS)
VStack(alignment: .leading) { VStack(alignment: .leading) {
HStack(alignment: .center) { HStack {
Text(editing ? "Edit Playlist" : "Create Playlist") Text(editing ? "Edit Playlist" : "Create Playlist")
.font(.title2.bold()) .font(.title2.bold())
@ -99,7 +99,7 @@ struct PlaylistFormView: View {
#if os(tvOS) #if os(tvOS)
var header: some View { var header: some View {
HStack(alignment: .center) { HStack {
Text(editing ? "Edit Playlist" : "Create Playlist") Text(editing ? "Edit Playlist" : "Create Playlist")
.font(.title2.bold()) .font(.title2.bold())

View File

@ -39,7 +39,7 @@ struct AccountForm: View {
} }
var header: some View { var header: some View {
HStack(alignment: .center) { HStack {
Text("Add Account") Text("Add Account")
.font(.title2.bold()) .font(.title2.bold())

View File

@ -41,7 +41,7 @@ struct InstanceForm: View {
} }
private var header: some View { private var header: some View {
HStack(alignment: .center) { HStack {
Text("Add Location") Text("Add Location")
.font(.title2.bold()) .font(.title2.bold())
@ -84,7 +84,7 @@ struct InstanceForm: View {
} }
private var footer: some View { private var footer: some View {
HStack(alignment: .center) { HStack {
AccountValidationStatus( AccountValidationStatus(
app: $app, app: $app,
isValid: $isValid, isValid: $isValid,

View File

@ -53,7 +53,7 @@ struct QualityProfileForm: View {
} }
var header: some View { var header: some View {
HStack(alignment: .center) { HStack {
Text(editing ? "Edit Quality Profile" : "Add Quality Profile") Text(editing ? "Edit Quality Profile" : "Add Quality Profile")
.font(.title2.bold()) .font(.title2.bold())

View File

@ -58,7 +58,7 @@ struct TrendingView: View {
.padding(.horizontal) .padding(.horizontal)
}) { }) {
Section { Section {
VStack(alignment: .center, spacing: 0) { VStack(spacing: 0) {
#if os(tvOS) #if os(tvOS)
toolbar toolbar
HorizontalCells(items: trending) HorizontalCells(items: trending)

View File

@ -205,7 +205,7 @@ struct VideoCell: View {
if let time = video.length.formattedAsPlaybackTime() || video.live || video.upcoming { if let time = video.length.formattedAsPlaybackTime() || video.live || video.upcoming {
Spacer() Spacer()
VStack(alignment: .center) { VStack {
Spacer() Spacer()
if let time = video.length.formattedAsPlaybackTime() { if let time = video.length.formattedAsPlaybackTime() {
@ -377,7 +377,7 @@ struct VideoCell: View {
Spacer() Spacer()
HStack(alignment: .center) { HStack {
if saveHistory, if saveHistory,
watchedVideoStyle.isShowingBadge, watchedVideoStyle.isShowingBadge,
watch?.finished ?? false watch?.finished ?? false

View File

@ -103,7 +103,7 @@ struct NowPlayingView: View {
} else if comments.loaded && comments.all.isEmpty { } else if comments.loaded && comments.all.isEmpty {
NoCommentsView(text: "No comments".localized(), systemImage: "0.circle.fill") NoCommentsView(text: "No comments".localized(), systemImage: "0.circle.fill")
} else if !comments.loaded { } else if !comments.loaded {
VStack(alignment: .center) { VStack {
PlaceholderProgressView() PlaceholderProgressView()
.onAppear { .onAppear {
comments.loadIfNeeded() comments.loadIfNeeded()