diff --git a/lib/cwtch/cwtchNotifier.dart b/lib/cwtch/cwtchNotifier.dart index 96c0d5a2..842689fa 100644 --- a/lib/cwtch/cwtchNotifier.dart +++ b/lib/cwtch/cwtchNotifier.dart @@ -58,6 +58,11 @@ class CwtchNotifier { // EnvironmentConfig.debugLog("NewEvent $type $data"); switch (type) { case "CwtchStarted": + + flwtchState.cwtch.getCwtchDir().then((dir) { + globalSettings.themeloader.LoadThemes(dir); + }); + if (data["Reload"] == "true" && profileCN.num > 0) { // don't reload... // unless we have loaded no profiles...then there isnt a risk and this diff --git a/lib/main.dart b/lib/main.dart index d73071ab..34212601 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -103,13 +103,10 @@ class FlwtchState extends State with WindowListener { new CwtchNotifier(profs, globalSettings, globalErrorHandler, globalTorStatus, newDesktopNotificationsManager(_notificationSelectConvo), globalAppState, globalServersList, this); cwtch = CwtchFfi(cwtchNotifier); } - print("initState: invoking cwtch.Start()"); // Cwtch.start can take time, we don't want it blocking first splash screen draw, so postpone a smidge to let splash render - - cwtch.Start().then((vale) { - cwtch.getCwtchDir().then((dir) { - globalSettings.themeloader.LoadThemes(dir); - }); + Future.delayed(const Duration(milliseconds: 100), () { + print("initState delayed: invoking cwtch.Start()"); + cwtch.Start(); }); print("initState: starting connectivityListener"); if (EnvironmentConfig.TEST_MODE == false) { diff --git a/lib/views/splashView.dart b/lib/views/splashView.dart index 1078bc8e..9e3eb24d 100644 --- a/lib/views/splashView.dart +++ b/lib/views/splashView.dart @@ -7,6 +7,7 @@ import 'package:flutter_gen/gen_l10n/app_localizations.dart'; import '../main.dart'; import '../settings.dart'; +import '../themes/cwtch.dart'; class SplashView extends StatefulWidget { @override @@ -26,6 +27,7 @@ class _SplashViewState extends State { return Consumer( builder: (context, appState, child) => Scaffold( + backgroundColor: darkGreyPurple, // Cwtch Dark Background key: Key("SplashView"), body: Center( child: Column(mainAxisAlignment: MainAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center, children: [ @@ -55,7 +57,7 @@ class _SplashViewState extends State { ? AppLocalizations.of(context)!.storageMigrationModalMessage : AppLocalizations.of(context)!.shuttingDownApp, // Todo l10n AppLocalizations.of(context)!.storageMigrationModalMessage style: defaultTextButtonStyle.copyWith( - fontSize: 16.0, color: appState.appError == "" ? Provider.of(context).theme.mainTextColor : Provider.of(context).theme.textfieldErrorColor))), + fontSize: 16.0, fontFamily: "Inter", color: appState.appError == "" ? whiteishPurple : hotPink))), Visibility( visible: appState.modalState == ModalState.storageMigration || appState.modalState == ModalState.shutdown, child: LinearProgressIndicator(