Swiftformat fixes

This commit is contained in:
Arkadiusz Fal
2024-05-16 18:28:32 +02:00
parent 4b21cd48e3
commit 7741e531f4
28 changed files with 57 additions and 65 deletions

View File

@@ -61,23 +61,23 @@ struct HistorySettings: View {
Toggle("Save history of played videos", isOn: $saveHistory)
Toggle("Show recents in sidebar", isOn: $showRecents)
#if os(macOS)
HStack {
Toggle("Limit recents shown", isOn: $limitRecents)
.frame(minWidth: 140, alignment: .leading)
.disabled(!showRecents)
Spacer()
counterButtons(for: $limitRecentsAmount)
.disabled(!limitRecents)
}
HStack {
Toggle("Limit recents shown", isOn: $limitRecents)
.frame(minWidth: 140, alignment: .leading)
.disabled(!showRecents)
Spacer()
counterButtons(for: $limitRecentsAmount)
.disabled(!limitRecents)
}
#else
Toggle("Limit recents shown", isOn: $limitRecents)
.disabled(!showRecents)
HStack {
Text("Recents shown")
Spacer()
counterButtons(for: $limitRecentsAmount)
.disabled(!limitRecents)
}
Toggle("Limit recents shown", isOn: $limitRecents)
.disabled(!showRecents)
HStack {
Text("Recents shown")
Spacer()
counterButtons(for: $limitRecentsAmount)
.disabled(!limitRecents)
}
#endif
Toggle("Show progress of watching on thumbnails", isOn: $showWatchingProgress)
.disabled(!saveHistory)
@@ -196,7 +196,7 @@ struct HistorySettings: View {
private func counterButtons(for _value: Binding<Int>) -> some View {
var value: Binding<Int> {
Binding(
get: { return _value.wrappedValue },
get: { _value.wrappedValue },
set: {
if $0 < 1 {
_value.wrappedValue = 1

View File

@@ -68,7 +68,7 @@ struct HomeSettings: View {
}
.help("Add to Favorites")
#if !os(tvOS)
.buttonStyle(.borderless)
.buttonStyle(.borderless)
#endif
}
}

View File

@@ -261,7 +261,6 @@ struct PlayerControlsSettings: View {
TextField("Duration", text: value)
.frame(width: textFieldWidth, alignment: .trailing)
.multilineTextAlignment(.center)
.labelsHidden()
#if !os(macOS)
.keyboardType(.numberPad)

View File

@@ -48,7 +48,6 @@ struct QualityProfileForm: View {
.onAppear(perform: initializeForm)
.onChange(of: backend, perform: { _ in backendChanged(self.backend); updateActiveFormats(); validate() })
.onChange(of: name, perform: { _ in validate() })
.onChange(of: resolution, perform: { _ in validate() })
.onChange(of: orderedFormats, perform: { _ in validate() })

View File

@@ -1,6 +1,7 @@
import Defaults
import Foundation
import SwiftUI
struct SettingsView: View {
static let matrixURL = URL(string: "https://tinyurl.com/matrix-yattee")!
static let discordURL = URL(string: "https://yattee.stream/discord")!