Stagemanager Support & Cache Wording inconsistency fixes (#135)
Some checks are pending
Build and Release / Build IPA (push) Waiting to run
Build and Release / Build Mac Catalyst (push) Waiting to run

This commit is contained in:
realdoomsboygaming 2025-05-25 23:19:17 -05:00 committed by GitHub
parent d26f066da0
commit e0c6e03c3f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 17 additions and 5 deletions

View file

@ -16,6 +16,7 @@ struct LibraryView: View {
@AppStorage("mediaColumnsLandscape") private var mediaColumnsLandscape: Int = 4 @AppStorage("mediaColumnsLandscape") private var mediaColumnsLandscape: Int = 4
@Environment(\.verticalSizeClass) var verticalSizeClass @Environment(\.verticalSizeClass) var verticalSizeClass
@Environment(\.horizontalSizeClass) var horizontalSizeClass
@State private var selectedBookmark: LibraryItem? = nil @State private var selectedBookmark: LibraryItem? = nil
@State private var isDetailActive: Bool = false @State private var isDetailActive: Bool = false
@ -28,10 +29,15 @@ struct LibraryView: View {
] ]
private var columnsCount: Int { 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 let isLandscape = UIScreen.main.bounds.width > UIScreen.main.bounds.height
return isLandscape ? mediaColumnsLandscape : mediaColumnsPortrait return isLandscape ? mediaColumnsLandscape : mediaColumnsPortrait
} else { } else {
// iPhone layout
return verticalSizeClass == .compact ? mediaColumnsLandscape : mediaColumnsPortrait return verticalSizeClass == .compact ? mediaColumnsLandscape : mediaColumnsPortrait
} }
} }
@ -206,9 +212,15 @@ struct LibraryView: View {
} }
private func determineColumns() -> Int { 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 return isLandscape ? mediaColumnsLandscape : mediaColumnsPortrait
} else { } else {
// iPhone layout
return verticalSizeClass == .compact ? mediaColumnsLandscape : mediaColumnsPortrait return verticalSizeClass == .compact ? mediaColumnsLandscape : mediaColumnsPortrait
} }
} }

View file

@ -61,7 +61,7 @@ struct SettingsViewData: View {
} }
HStack { HStack {
Text("Current Cache Size") Text("Current Metadata Cache Size")
Spacer() Spacer()
if isCalculatingSize { if isCalculatingSize {
ProgressView() ProgressView()
@ -73,7 +73,7 @@ struct SettingsViewData: View {
} }
Button(action: clearAllCaches) { Button(action: clearAllCaches) {
Text("Clear All Caches") Text("Clear All Metadata Caches")
.foregroundColor(.red) .foregroundColor(.red)
} }
} }
@ -101,7 +101,7 @@ struct SettingsViewData: View {
.font(.subheadline) .font(.subheadline)
.foregroundColor(.secondary) .foregroundColor(.secondary)
} }
HStack { HStack {
Button(action: { Button(action: {
showRemoveMovPkgAlert = true showRemoveMovPkgAlert = true