Fix 5 TestFlight crash types from builds 250-254

- Fix BGTaskScheduler assertion crash on Mac Catalyst by guarding all
  iOS background task APIs with isMacCatalystApp check
- Fix iPad popover crash in UIPopoverPresentationController by adding
  .presentationCompactAdaptation(.sheet) to all 27 confirmationDialogs
- Fix SwiftData assertion crash when accessing deleted Bookmark model
  properties during SwiftUI hit testing in BookmarkRowView
- Fix UICollectionView invalid item count crash on queue swipe-to-delete
  by using ID-based removal with withAnimation instead of stale index
- Fix Range crash in storyboard download when storyboardCount is zero
This commit is contained in:
Arkadiusz Fal
2026-03-27 17:52:08 +01:00
parent 2db78c429e
commit 3c04b8540f
22 changed files with 59 additions and 3 deletions

View File

@@ -103,6 +103,7 @@ struct AddRemoteServerView: View {
} message: {
Text(String(localized: "sources.yatteeServer.warning.message"))
}
.presentationCompactAdaptation(.sheet)
#else
formContent
.navigationTitle(String(localized: "sources.addRemoteServer"))
@@ -118,6 +119,7 @@ struct AddRemoteServerView: View {
} message: {
Text(String(localized: "sources.yatteeServer.warning.message"))
}
.presentationCompactAdaptation(.sheet)
#endif
}

View File

@@ -49,6 +49,7 @@ struct AdvancedSettingsView: View {
}
Button(String(localized: "common.cancel"), role: .cancel) {}
}
.presentationCompactAdaptation(.sheet)
.onAppear {
userAgentText = settingsManager.customUserAgent
#if !os(tvOS)
@@ -68,6 +69,7 @@ struct AdvancedSettingsView: View {
} message: {
Text(String(localized: "settings.advanced.storage.deleteOrphaned.message \(orphanedFilesCount) \(formatBytes(orphanedFilesSize))"))
}
.presentationCompactAdaptation(.sheet)
.alert(
String(localized: "settings.advanced.storage.cleanupComplete"),
isPresented: $showingOrphanCleanupResult

View File

@@ -45,6 +45,7 @@ struct DeveloperSettingsView: View {
} message: {
Text(String(localized: "settings.advanced.data.removeDuplicates.message"))
}
.presentationCompactAdaptation(.sheet)
.alert(
String(localized: "settings.advanced.data.deduplicationComplete"),
isPresented: $showingDeduplicationResult
@@ -71,6 +72,7 @@ struct DeveloperSettingsView: View {
} message: {
Text(String(localized: "settings.advanced.data.resetICloud.message"))
}
.presentationCompactAdaptation(.sheet)
.alert(
String(localized: "settings.advanced.data.iCloudReset"),
isPresented: $showingResetiCloudComplete

View File

@@ -334,6 +334,7 @@ private struct EditRemoteServerContent: View {
}
Button(String(localized: "common.cancel"), role: .cancel) {}
}
.presentationCompactAdaptation(.sheet)
.sheet(isPresented: $showLoginSheet) {
InstanceLoginView(instance: instance) { credential in
appEnvironment?.credentialsManager(for: instance)?.setCredential(credential, for: instance)
@@ -366,6 +367,7 @@ private struct EditRemoteServerContent: View {
} message: {
Text(String(localized: "sources.yatteeServer.warning.message"))
}
.presentationCompactAdaptation(.sheet)
}
// MARK: - Computed Properties
@@ -733,6 +735,7 @@ private struct EditFileSourceContent: View {
}
Button(String(localized: "common.cancel"), role: .cancel) {}
}
.presentationCompactAdaptation(.sheet)
}
@ViewBuilder

View File

@@ -77,6 +77,7 @@ struct ImportPlaylistsView: View {
Task { await addAllPlaylists() }
}
}
.presentationCompactAdaptation(.sheet)
.confirmationDialog(
String(localized: "import.playlists.mergeWarning.title"),
isPresented: $showMergeWarning,
@@ -97,6 +98,7 @@ struct ImportPlaylistsView: View {
Text(String(localized: "import.playlists.mergeWarning.message \(playlist.title)"))
}
}
.presentationCompactAdaptation(.sheet)
.task {
await loadPlaylists()
}

View File

@@ -68,6 +68,7 @@ struct ImportSubscriptionsView: View {
addAllSubscriptions()
}
}
.presentationCompactAdaptation(.sheet)
.task {
await loadSubscriptions()
}

View File

@@ -318,6 +318,7 @@ private struct EditMPVOptionSheet: View {
}
Button(String(localized: "common.cancel"), role: .cancel) {}
}
.presentationCompactAdaptation(.sheet)
}
#if os(macOS)
.frame(minWidth: 400, minHeight: 200)

View File

@@ -75,6 +75,7 @@ struct SourcesListView: View {
pendingDeleteSource = nil
}
}
.presentationCompactAdaptation(.sheet)
}
// MARK: - Empty State

View File

@@ -111,6 +111,7 @@ struct SubscriptionsSettingsView: View {
} message: {
Text(String(localized: "settings.subscriptions.account.switch.message"))
}
.presentationCompactAdaptation(.sheet)
}
// MARK: - Account Section

View File

@@ -101,6 +101,7 @@ struct iCloudSettingsView: View {
} message: {
Text(String(localized: "settings.icloud.enable.confirmation.message"))
}
.presentationCompactAdaptation(.sheet)
.confirmationDialog(
String(localized: "settings.icloud.disable.confirmation.title"),
isPresented: $showingDisableConfirmation,
@@ -113,6 +114,7 @@ struct iCloudSettingsView: View {
} message: {
Text(String(localized: "settings.icloud.disable.confirmation.message"))
}
.presentationCompactAdaptation(.sheet)
// Confirmation for categories that replace local data (instances, settings, media sources)
.confirmationDialog(
String(localized: "settings.icloud.category.enable.title"),
@@ -134,6 +136,7 @@ struct iCloudSettingsView: View {
} message: {
Text(String(localized: "settings.icloud.category.enable.message"))
}
.presentationCompactAdaptation(.sheet)
// Confirmation for categories that upload/merge local data (subscriptions, bookmarks, playlists, history)
.confirmationDialog(
String(localized: "settings.icloud.category.sync.title"),
@@ -155,6 +158,7 @@ struct iCloudSettingsView: View {
} message: {
Text(String(localized: "settings.icloud.category.sync.message"))
}
.presentationCompactAdaptation(.sheet)
}
// MARK: - Sync Categories Section