couple small fixes

This commit is contained in:
julian 2024-06-05 17:56:10 -06:00
parent e9063dbc0f
commit eb13c2dc00
2 changed files with 35 additions and 32 deletions

View file

@ -16,6 +16,8 @@ import 'package:crypto/crypto.dart';
import 'package:flutter/services.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:isar/isar.dart';
import '../app_config.dart';
import '../db/isar/main_db.dart';
import '../models/isar/stack_theme.dart';
import '../networking/http.dart';
@ -145,7 +147,7 @@ class ThemeService {
);
}
}
if (AppConfig.hasFeature(AppFeature.themeSelection)) {
if (!(await ThemeService.instance.verifyInstalled(themeId: "dark"))) {
Logging.instance.log(
"Installing default dark theme... ",
@ -178,6 +180,7 @@ class ThemeService {
// }
}
}
}
// TODO more thorough check/verification of theme
Future<bool> verifyInstalled({required String themeId}) async {

View file

@ -123,7 +123,7 @@ abstract class StackFileSystem {
if (Util.isDesktop) {
final dir = Directory("${root.path}/sqlite/firo_cache");
if (!dir.existsSync()) {
await dir.create();
await dir.create(recursive: true);
}
return dir;
} else {