Skip to content

Commit

Permalink
chore: make sure Settings is initialized
Browse files Browse the repository at this point in the history
  • Loading branch information
Sivan22 committed Nov 21, 2024
1 parent 1ed6a79 commit 44bbfad
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/data/data_providers/file_system_data_provider.dart
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,9 @@ class FileSystemData {
/// Reads metadata from a JSON file and creates a structured mapping of
/// book titles to their metadata information.
Future<Map<String, Map<String, dynamic>>> _getMetadata() async {
if (!Settings.isInitialized) {
await Settings.init(cacheProvider: HiveCache());
}
String metadataString = '';
Map<String, Map<String, dynamic>> metadata = {};
try {
Expand Down

0 comments on commit 44bbfad

Please sign in to comment.