mirror of
https://github.com/cranci1/Sora.git
synced 2026-01-11 20:10:24 +00:00
Stagemanager Support & Cache Wording inconsistency fixes (#135)
This commit is contained in:
parent
d26f066da0
commit
e0c6e03c3f
2 changed files with 17 additions and 5 deletions
|
|
@ -16,6 +16,7 @@ struct LibraryView: View {
|
|||
@AppStorage("mediaColumnsLandscape") private var mediaColumnsLandscape: Int = 4
|
||||
|
||||
@Environment(\.verticalSizeClass) var verticalSizeClass
|
||||
@Environment(\.horizontalSizeClass) var horizontalSizeClass
|
||||
|
||||
@State private var selectedBookmark: LibraryItem? = nil
|
||||
@State private var isDetailActive: Bool = false
|
||||
|
|
@ -28,10 +29,15 @@ struct LibraryView: View {
|
|||
]
|
||||
|
||||
private var columnsCount: Int {
|
||||
if UIDevice.current.userInterfaceIdiom == .pad {
|
||||
// Stage Manager Detection
|
||||
if UIDevice.current.userInterfaceIdiom == .pad && horizontalSizeClass == .compact {
|
||||
return verticalSizeClass == .compact ? 3 : 2
|
||||
} else if UIDevice.current.userInterfaceIdiom == .pad {
|
||||
// Normal iPad layout
|
||||
let isLandscape = UIScreen.main.bounds.width > UIScreen.main.bounds.height
|
||||
return isLandscape ? mediaColumnsLandscape : mediaColumnsPortrait
|
||||
} else {
|
||||
// iPhone layout
|
||||
return verticalSizeClass == .compact ? mediaColumnsLandscape : mediaColumnsPortrait
|
||||
}
|
||||
}
|
||||
|
|
@ -206,9 +212,15 @@ struct LibraryView: View {
|
|||
}
|
||||
|
||||
private func determineColumns() -> Int {
|
||||
if UIDevice.current.userInterfaceIdiom == .pad {
|
||||
// Stage Manager Detection
|
||||
if UIDevice.current.userInterfaceIdiom == .pad && horizontalSizeClass == .compact {
|
||||
return verticalSizeClass == .compact ? 3 : 2
|
||||
} else if UIDevice.current.userInterfaceIdiom == .pad {
|
||||
// Normal iPad layout
|
||||
let isLandscape = UIScreen.main.bounds.width > UIScreen.main.bounds.height
|
||||
return isLandscape ? mediaColumnsLandscape : mediaColumnsPortrait
|
||||
} else {
|
||||
// iPhone layout
|
||||
return verticalSizeClass == .compact ? mediaColumnsLandscape : mediaColumnsPortrait
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ struct SettingsViewData: View {
|
|||
}
|
||||
|
||||
HStack {
|
||||
Text("Current Cache Size")
|
||||
Text("Current Metadata Cache Size")
|
||||
Spacer()
|
||||
if isCalculatingSize {
|
||||
ProgressView()
|
||||
|
|
@ -73,7 +73,7 @@ struct SettingsViewData: View {
|
|||
}
|
||||
|
||||
Button(action: clearAllCaches) {
|
||||
Text("Clear All Caches")
|
||||
Text("Clear All Metadata Caches")
|
||||
.foregroundColor(.red)
|
||||
}
|
||||
}
|
||||
|
|
@ -101,7 +101,7 @@ struct SettingsViewData: View {
|
|||
.font(.subheadline)
|
||||
.foregroundColor(.secondary)
|
||||
}
|
||||
|
||||
|
||||
HStack {
|
||||
Button(action: {
|
||||
showRemoveMovPkgAlert = true
|
||||
|
|
|
|||
Loading…
Reference in a new issue