mirror of
https://github.com/yattee/yattee.git
synced 2024-12-22 05:23:41 +00:00
Fix codestyle
This commit is contained in:
parent
bb19fca073
commit
cbcf58d5c7
2
.swiftformat
Normal file
2
.swiftformat
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
--disable trailingCommas
|
||||||
|
--exclude Tests*
|
@ -1 +1,9 @@
|
|||||||
parent_config: https://raw.githubusercontent.com/sindresorhus/swiftlint-config/main/.swiftlint.yml
|
parent_config: https://raw.githubusercontent.com/sindresorhus/swiftlint-config/main/.swiftlint.yml
|
||||||
|
|
||||||
|
disabled_rules:
|
||||||
|
- opening_brace
|
||||||
|
|
||||||
|
excluded:
|
||||||
|
- Tests Apple TV
|
||||||
|
- Tests iOS
|
||||||
|
- Tests macOS
|
||||||
|
@ -2,7 +2,7 @@ import SwiftUI
|
|||||||
|
|
||||||
struct TrendingCountrySelectionView: View {
|
struct TrendingCountrySelectionView: View {
|
||||||
@Environment(\.presentationMode) private var presentationMode
|
@Environment(\.presentationMode) private var presentationMode
|
||||||
@ObservedObject var provider: TrendingCountriesProvider
|
@ObservedObject private var provider = TrendingCountriesProvider()
|
||||||
|
|
||||||
@State private var query: String = ""
|
@State private var query: String = ""
|
||||||
@Binding var selectedCountry: Country
|
@Binding var selectedCountry: Country
|
||||||
|
@ -6,7 +6,6 @@ struct TrendingView: View {
|
|||||||
|
|
||||||
@Binding var tabSelection: TabSelection
|
@Binding var tabSelection: TabSelection
|
||||||
|
|
||||||
@ObservedObject private var countriesProvider = TrendingCountriesProvider()
|
|
||||||
@ObservedObject private var videosProvider = TrendingVideosProvider()
|
@ObservedObject private var videosProvider = TrendingVideosProvider()
|
||||||
|
|
||||||
@State private var selectingCategory = false
|
@State private var selectingCategory = false
|
||||||
@ -32,7 +31,7 @@ struct TrendingView: View {
|
|||||||
selectingCountry.toggle()
|
selectingCountry.toggle()
|
||||||
}
|
}
|
||||||
.fullScreenCover(isPresented: $selectingCountry) {
|
.fullScreenCover(isPresented: $selectingCountry) {
|
||||||
TrendingCountrySelectionView(provider: countriesProvider, selectedCountry: $trendingState.country)
|
TrendingCountrySelectionView(selectedCountry: $trendingState.country)
|
||||||
}
|
}
|
||||||
|
|
||||||
Spacer()
|
Spacer()
|
||||||
|
@ -33,7 +33,7 @@ final class PlayerState: ObservableObject {
|
|||||||
var externalMetadata = [
|
var externalMetadata = [
|
||||||
makeMetadataItem(.commonIdentifierTitle, value: video.title),
|
makeMetadataItem(.commonIdentifierTitle, value: video.title),
|
||||||
makeMetadataItem(.quickTimeMetadataGenre, value: video.genre),
|
makeMetadataItem(.quickTimeMetadataGenre, value: video.genre),
|
||||||
makeMetadataItem(.commonIdentifierDescription, value: video.description),
|
makeMetadataItem(.commonIdentifierDescription, value: video.description)
|
||||||
]
|
]
|
||||||
|
|
||||||
if let thumbnailData = try? Data(contentsOf: video.thumbnailURL!),
|
if let thumbnailData = try? Data(contentsOf: video.thumbnailURL!),
|
||||||
|
@ -29,7 +29,7 @@ final class SponsorBlockSegmentsProvider: ObservableObject {
|
|||||||
private var parameters: [String: String] {
|
private var parameters: [String: String] {
|
||||||
[
|
[
|
||||||
"videoID": id,
|
"videoID": id,
|
||||||
"categories": JSON(SponsorBlockSegmentsProvider.categories).rawString(String.Encoding.utf8)!,
|
"categories": JSON(SponsorBlockSegmentsProvider.categories).rawString(String.Encoding.utf8)!
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user