mirror of
https://github.com/permissionlesstech/bitchat.git
synced 2026-07-24 23:45:18 +00:00
Fix main actor isolation error in clearAppSwitcherSnapshots
Add `nonisolated` to the static method since it only performs thread-safe FileManager operations and is called from Task.detached. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user