mirror of
https://github.com/permissionlesstech/bitchat.git
synced 2026-07-24 22:45:19 +00:00
Merge pull request #951 from permissionlesstech/fix/main-actor-isolation-snapshots
Fix main actor isolation error in clearAppSwitcherSnapshots
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