mirror of
https://github.com/cranci1/Sora.git
synced 2026-03-11 09:35:38 +00:00
fix double column count calculation !?
This commit is contained in:
parent
3381a3c4a1
commit
d82a13ee64
4 changed files with 0 additions and 29 deletions
|
|
@ -26,7 +26,6 @@ class VTTSubtitlesLoader: ObservableObject {
|
|||
|
||||
func load(from urlString: String) {
|
||||
guard let url = URL(string: urlString) else { return }
|
||||
|
||||
let format = determineSubtitleFormat(from: url)
|
||||
|
||||
URLSession.shared.dataTask(with: url) { data, _, error in
|
||||
|
|
|
|||
|
|
@ -71,7 +71,6 @@ struct ExploreView: View {
|
|||
var body: some View {
|
||||
NavigationView {
|
||||
ScrollView {
|
||||
let columnsCount = determineColumns()
|
||||
VStack(spacing: 0) {
|
||||
if !(hideEmptySections ?? false) && selectedModule == nil {
|
||||
VStack(spacing: 8) {
|
||||
|
|
@ -322,14 +321,6 @@ struct ExploreView: View {
|
|||
}
|
||||
}
|
||||
|
||||
private func determineColumns() -> Int {
|
||||
if UIDevice.current.userInterfaceIdiom == .pad {
|
||||
return isLandscape ? mediaColumnsLandscape : mediaColumnsPortrait
|
||||
} else {
|
||||
return verticalSizeClass == .compact ? mediaColumnsLandscape : mediaColumnsPortrait
|
||||
}
|
||||
}
|
||||
|
||||
private func cleanLanguageName(_ language: String?) -> String {
|
||||
guard let language else { return "Unknown" }
|
||||
|
||||
|
|
|
|||
|
|
@ -54,8 +54,6 @@ struct LibraryView: View {
|
|||
var body: some View {
|
||||
NavigationView {
|
||||
ScrollView {
|
||||
let columnsCount = determineColumns()
|
||||
|
||||
VStack(alignment: .leading, spacing: 12) {
|
||||
if hideEmptySections != true || !continueWatchingManager.items.isEmpty {
|
||||
Text("Continue Watching")
|
||||
|
|
@ -255,14 +253,6 @@ struct LibraryView: View {
|
|||
isLandscape = UIDevice.current.orientation.isLandscape
|
||||
}
|
||||
}
|
||||
|
||||
private func determineColumns() -> Int {
|
||||
if UIDevice.current.userInterfaceIdiom == .pad {
|
||||
return isLandscape ? mediaColumnsLandscape : mediaColumnsPortrait
|
||||
} else {
|
||||
return verticalSizeClass == .compact ? mediaColumnsLandscape : mediaColumnsPortrait
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
struct ContinueWatchingSection: View {
|
||||
|
|
|
|||
|
|
@ -72,7 +72,6 @@ struct SearchView: View {
|
|||
var body: some View {
|
||||
NavigationView {
|
||||
ScrollView {
|
||||
let columnsCount = determineColumns()
|
||||
VStack(spacing: 0) {
|
||||
HStack {
|
||||
SearchBar(text: $searchText, onSearchButtonClicked: performSearch)
|
||||
|
|
@ -336,14 +335,6 @@ struct SearchView: View {
|
|||
}
|
||||
}
|
||||
|
||||
private func determineColumns() -> Int {
|
||||
if UIDevice.current.userInterfaceIdiom == .pad {
|
||||
return isLandscape ? mediaColumnsLandscape : mediaColumnsPortrait
|
||||
} else {
|
||||
return verticalSizeClass == .compact ? mediaColumnsLandscape : mediaColumnsPortrait
|
||||
}
|
||||
}
|
||||
|
||||
private func cleanLanguageName(_ language: String?) -> String {
|
||||
guard let language else { return "Unknown" }
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue