Skip to content

Commit

Permalink
fix: Correct the loading of the device-config when no user-config exists
Browse files Browse the repository at this point in the history
This fix also corrects order of the logging/DCM initialization.

Fixes intiface#157
  • Loading branch information
blackspherefollower committed Oct 25, 2024
1 parent 99dba43 commit aa8c55d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@ class UserDeviceConfigurationCubit extends Cubit<UserDeviceConfigurationState> {

Future<void> loadConfig() async {
try {
if (!IntifacePaths.userDeviceConfigFile.existsSync()) {
return;
}
String? deviceConfig;
String? userConfig;
if (IntifacePaths.deviceConfigFile.existsSync()) {
Expand Down
4 changes: 3 additions & 1 deletion lib/intiface_central_app.dart
Original file line number Diff line number Diff line change
Expand Up @@ -275,9 +275,11 @@ class IntifaceCentralApp extends StatelessWidget with WindowListener {
// Bring up the FFI now that we have logging available and crash logging set up.
initializeApi();

// Setup logging before initializing the DCM
var apiLog = NativeApiLog();

var userConfigCubit = await UserDeviceConfigurationCubit.create();

var apiLog = NativeApiLog();
apiLog.logMessageStream.listen((message) {
var level = message.level;
if (level == "DEBUG") {
Expand Down

0 comments on commit aa8c55d

Please sign in to comment.