Add core debug flag

This commit is contained in:
problematicconsumer
2023-10-27 17:45:38 +03:30
parent 7a87084b78
commit bf1be7159c
6 changed files with 32 additions and 11 deletions

View File

@@ -1,5 +1,6 @@
import 'package:dio/dio.dart';
import 'package:hiddify/core/core_providers.dart';
import 'package:hiddify/core/prefs/general_prefs.dart';
import 'package:hiddify/data/api/clash_api.dart';
import 'package:hiddify/data/local/dao/dao.dart';
import 'package:hiddify/data/local/database.dart';
@@ -61,5 +62,6 @@ CoreFacade coreFacade(CoreFacadeRef ref) => CoreFacadeImpl(
ref.watch(singboxServiceProvider),
ref.watch(filesEditorServiceProvider),
ref.watch(clashApiProvider),
ref.read(debugModeNotifierProvider),
() => ref.read(configOptionsProvider),
);

View File

@@ -18,12 +18,14 @@ class CoreFacadeImpl with ExceptionHandler, InfraLogger implements CoreFacade {
this.singbox,
this.filesEditor,
this.clash,
this.debug,
this.configOptions,
);
final SingboxService singbox;
final FilesEditorService filesEditor;
final ClashApi clash;
final bool debug;
final ConfigOptions Function() configOptions;
bool _initialized = false;
@@ -39,6 +41,7 @@ class CoreFacadeImpl with ExceptionHandler, InfraLogger implements CoreFacade {
filesEditor.dirs.baseDir.path,
filesEditor.dirs.workingDir.path,
filesEditor.dirs.tempDir.path,
debug,
)
.map((r) {
loggy.debug("setup complete");