From af4eec89ad083d723fec124350e59ace7c2c9cf6 Mon Sep 17 00:00:00 2001 From: Mehakdeep Singh <118588258+mrandhawa14@users.noreply.github.com> Date: Sat, 2 May 2026 22:24:20 -0700 Subject: [PATCH] fix(macos): use Application Support directory for persistent storage to avoid MDBX iCloud issues, So no more black screen for mac users --- lib/providers/storage_provider.dart | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/providers/storage_provider.dart b/lib/providers/storage_provider.dart index 37442f5f..706811af 100644 --- a/lib/providers/storage_provider.dart +++ b/lib/providers/storage_provider.dart @@ -52,7 +52,7 @@ class StorageProvider { if (Platform.isAndroid) { directory = Directory("/storage/emulated/0/Mangayomi/"); } else { - final dir = await getApplicationDocumentsDirectory(); + final dir = await getApplicationSupportDirectory(); // The documents dir in iOS is already named "Mangayomi". // Appending "Mangayomi" to the documents dir would create // unnecessarily nested Mangayomi/Mangayomi/ folder. @@ -133,7 +133,7 @@ class StorageProvider { dPath.isEmpty ? "/storage/emulated/0/Mangayomi/" : "$dPath/", ); } else { - final dir = await getApplicationDocumentsDirectory(); + final dir = await getApplicationSupportDirectory(); final p = dPath.isEmpty ? dir.path : dPath; // The documents dir in iOS is already named "Mangayomi". // Appending "Mangayomi" to the documents dir would create @@ -181,7 +181,7 @@ class StorageProvider { } Future getDatabaseDirectory() async { - final dir = await getApplicationDocumentsDirectory(); + final dir = await getApplicationSupportDirectory(); String dbDir; if (Platform.isAndroid) return dir; if (Platform.isIOS) {