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 {
LazyVStack {
if visibleWatches.isEmpty {
VStack(alignment: .center, spacing: 20) {
VStack(spacing: 20) {
HStack {
Image(systemName: "clock")
Text("Playback history is empty")

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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