Merge pull request #951 from permissionlesstech/fix/main-actor-isolation-snapshots

Fix main actor isolation error in clearAppSwitcherSnapshots
This commit is contained in:
jack
2026-01-12 16:11:40 -10:00
committed by GitHub
+1 -1
View File
@@ -2072,7 +2072,7 @@ final class ChatViewModel: ObservableObject, BitchatDelegate, CommandContextProv
/// iOS stores preview screenshots in Library/Caches/Snapshots/<bundle_id>/ /// iOS stores preview screenshots in Library/Caches/Snapshots/<bundle_id>/
/// These could reveal sensitive information visible in the app at the time /// These could reveal sensitive information visible in the app at the time
#if os(iOS) #if os(iOS)
private static func clearAppSwitcherSnapshots() { private nonisolated static func clearAppSwitcherSnapshots() {
do { do {
let cacheDir = try FileManager.default.url(for: .cachesDirectory, in: .userDomainMask, appropriateFor: nil, create: false) let cacheDir = try FileManager.default.url(for: .cachesDirectory, in: .userDomainMask, appropriateFor: nil, create: false)
let snapshotsDir = cacheDir.appendingPathComponent("Snapshots", isDirectory: true) let snapshotsDir = cacheDir.appendingPathComponent("Snapshots", isDirectory: true)