Skip to content

Commit

Permalink
Check result
Browse files Browse the repository at this point in the history
  • Loading branch information
Rexios80 committed Jan 24, 2025
1 parent e326a01 commit 6e989d1
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions hive/lib/src/backend/js/native/backend_manager.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,12 @@ class BackendManager implements BackendManagerInterface {
String? collection,
) async {
try {
await window.self.navigator.storage.persist().toDart;
debugPrint('Enabled persistent storage');
final result = await window.self.navigator.storage.persist().toDart;
if (result.toDart) {
debugPrint('Persistent storage is enabled');
} else {
debugPrint('Persistent storage is disabled');
}
} catch (e) {
debugPrint('Error enabling persistent storage');
debugPrint(e);
Expand Down

0 comments on commit 6e989d1

Please sign in to comment.