mirror of
https://github.com/yattee/yattee.git
synced 2024-12-21 21:13:42 +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
|
||||
|
||||
disabled_rules:
|
||||
- opening_brace
|
||||
|
||||
excluded:
|
||||
- Tests Apple TV
|
||||
- Tests iOS
|
||||
- Tests macOS
|
||||
|
@ -2,7 +2,7 @@ import SwiftUI
|
||||
|
||||
struct TrendingCountrySelectionView: View {
|
||||
@Environment(\.presentationMode) private var presentationMode
|
||||
@ObservedObject var provider: TrendingCountriesProvider
|
||||
@ObservedObject private var provider = TrendingCountriesProvider()
|
||||
|
||||
@State private var query: String = ""
|
||||
@Binding var selectedCountry: Country
|
||||
|
@ -6,7 +6,6 @@ struct TrendingView: View {
|
||||
|
||||
@Binding var tabSelection: TabSelection
|
||||
|
||||
@ObservedObject private var countriesProvider = TrendingCountriesProvider()
|
||||
@ObservedObject private var videosProvider = TrendingVideosProvider()
|
||||
|
||||
@State private var selectingCategory = false
|
||||
@ -32,7 +31,7 @@ struct TrendingView: View {
|
||||
selectingCountry.toggle()
|
||||
}
|
||||
.fullScreenCover(isPresented: $selectingCountry) {
|
||||
TrendingCountrySelectionView(provider: countriesProvider, selectedCountry: $trendingState.country)
|
||||
TrendingCountrySelectionView(selectedCountry: $trendingState.country)
|
||||
}
|
||||
|
||||
Spacer()
|
||||
|
@ -33,7 +33,7 @@ final class PlayerState: ObservableObject {
|
||||
var externalMetadata = [
|
||||
makeMetadataItem(.commonIdentifierTitle, value: video.title),
|
||||
makeMetadataItem(.quickTimeMetadataGenre, value: video.genre),
|
||||
makeMetadataItem(.commonIdentifierDescription, value: video.description),
|
||||
makeMetadataItem(.commonIdentifierDescription, value: video.description)
|
||||
]
|
||||
|
||||
if let thumbnailData = try? Data(contentsOf: video.thumbnailURL!),
|
||||
|
@ -29,7 +29,7 @@ final class SponsorBlockSegmentsProvider: ObservableObject {
|
||||
private var parameters: [String: String] {
|
||||
[
|
||||
"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