mirror of
https://github.com/yattee/yattee.git
synced 2024-12-22 13:33:42 +00:00
Codestyle fixes
This commit is contained in:
parent
3779b7ed1f
commit
f45001da78
@ -166,7 +166,7 @@ struct ChannelPlaylistView: View {
|
|||||||
#if os(iOS)
|
#if os(iOS)
|
||||||
.navigationBarTrailing
|
.navigationBarTrailing
|
||||||
#else
|
#else
|
||||||
.automatic
|
.automatic
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -291,7 +291,7 @@ enum PlayerSidebarSetting: String, CaseIterable, Defaults.Serializable {
|
|||||||
#if os(macOS)
|
#if os(macOS)
|
||||||
.always
|
.always
|
||||||
#else
|
#else
|
||||||
.whenFits
|
.whenFits
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -62,7 +62,7 @@ struct PlayerControls: View {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
.offset(y: 2)
|
.offset(y: 2)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
VStack {
|
VStack {
|
||||||
|
@ -44,7 +44,7 @@ struct VideoPlayerSizeModifier: ViewModifier {
|
|||||||
#if os(iOS)
|
#if os(iOS)
|
||||||
fullScreen ? .fill : .fit
|
fullScreen ? .fill : .fit
|
||||||
#else
|
#else
|
||||||
.fit
|
.fit
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -48,7 +48,7 @@ struct AddToPlaylistView: View {
|
|||||||
#if os(tvOS)
|
#if os(tvOS)
|
||||||
600
|
600
|
||||||
#else
|
#else
|
||||||
.infinity
|
.infinity
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -115,7 +115,7 @@ struct AddToPlaylistView: View {
|
|||||||
#if os(tvOS)
|
#if os(tvOS)
|
||||||
.trailing
|
.trailing
|
||||||
#else
|
#else
|
||||||
.center
|
.center
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -107,7 +107,7 @@ struct PlaylistVideosView: View {
|
|||||||
#if os(iOS)
|
#if os(iOS)
|
||||||
.navigationBarTrailing
|
.navigationBarTrailing
|
||||||
#else
|
#else
|
||||||
.automatic
|
.automatic
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -150,7 +150,7 @@ struct PlaylistsView: View {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
.onReceive(NotificationCenter.default.publisher(for: UIApplication.willEnterForegroundNotification)) { _ in
|
.onReceive(NotificationCenter.default.publisher(for: UIApplication.willEnterForegroundNotification)) { _ in
|
||||||
model.load()
|
model.load()
|
||||||
loadResource()
|
loadResource()
|
||||||
}
|
}
|
||||||
|
@ -167,7 +167,7 @@ struct SearchView: View {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
.ignoresSafeArea(.keyboard, edges: .bottom)
|
.ignoresSafeArea(.keyboard, edges: .bottom)
|
||||||
.navigationTitle("Search")
|
.navigationTitle("Search")
|
||||||
#endif
|
#endif
|
||||||
#if os(iOS)
|
#if os(iOS)
|
||||||
@ -260,7 +260,7 @@ struct SearchView: View {
|
|||||||
#if os(iOS)
|
#if os(iOS)
|
||||||
accounts.app.supportsSearchFilters || favorites.isEnabled ? .bottomBar : .automatic
|
accounts.app.supportsSearchFilters || favorites.isEnabled ? .bottomBar : .automatic
|
||||||
#else
|
#else
|
||||||
.automatic
|
.automatic
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -79,7 +79,7 @@ struct TrendingView: View {
|
|||||||
TrendingCountry(selectedCountry: $country)
|
TrendingCountry(selectedCountry: $country)
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
.sheet(isPresented: $presentingCountrySelection) {
|
.sheet(isPresented: $presentingCountrySelection) {
|
||||||
TrendingCountry(selectedCountry: $country)
|
TrendingCountry(selectedCountry: $country)
|
||||||
#if os(macOS)
|
#if os(macOS)
|
||||||
.frame(minWidth: 400, minHeight: 400)
|
.frame(minWidth: 400, minHeight: 400)
|
||||||
@ -128,7 +128,7 @@ struct TrendingView: View {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
.onReceive(NotificationCenter.default.publisher(for: UIApplication.willEnterForegroundNotification)) { _ in
|
.onReceive(NotificationCenter.default.publisher(for: UIApplication.willEnterForegroundNotification)) { _ in
|
||||||
resource.loadIfNeeded()?
|
resource.loadIfNeeded()?
|
||||||
.onFailure { self.error = $0 }
|
.onFailure { self.error = $0 }
|
||||||
.onSuccess { _ in self.error = nil }
|
.onSuccess { _ in self.error = nil }
|
||||||
|
@ -76,7 +76,7 @@ struct PopularView: View {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
.onReceive(NotificationCenter.default.publisher(for: UIApplication.willEnterForegroundNotification)) { _ in
|
.onReceive(NotificationCenter.default.publisher(for: UIApplication.willEnterForegroundNotification)) { _ in
|
||||||
resource?.loadIfNeeded()?
|
resource?.loadIfNeeded()?
|
||||||
.onFailure { self.error = $0 }
|
.onFailure { self.error = $0 }
|
||||||
.onSuccess { _ in self.error = nil }
|
.onSuccess { _ in self.error = nil }
|
||||||
|
@ -61,7 +61,7 @@ struct YatteeApp: App {
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
#else
|
#else
|
||||||
.onReceive(
|
.onReceive(
|
||||||
NotificationCenter.default.publisher(for: UIApplication.willEnterForegroundNotification)
|
NotificationCenter.default.publisher(for: UIApplication.willEnterForegroundNotification)
|
||||||
) { _ in
|
) { _ in
|
||||||
player.handleEnterForeground()
|
player.handleEnterForeground()
|
||||||
|
Loading…
Reference in New Issue
Block a user