fix: Black window flash when starting the app (#1003)

This commit is contained in:
Piotr Rogowski 2024-01-02 17:21:12 +01:00 committed by GitHub
parent 7e1005dc62
commit 02e44fc6b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -58,15 +58,6 @@ Future<void> main(List<String> rawArgs) async {
await DesktopTools.window.setPreventClose(true);
}
await DesktopTools.ensureInitialized(
DesktopWindowOptions(
hideTitleBar: true,
title: "Spotube",
backgroundColor: Colors.transparent,
minimumSize: const Size(300, 700),
),
);
await SystemTheme.accentColor.load();
if (!kIsWeb) {
@ -107,6 +98,15 @@ Future<void> main(List<String> rawArgs) async {
path: hiveCacheDir,
);
await DesktopTools.ensureInitialized(
DesktopWindowOptions(
hideTitleBar: true,
title: "Spotube",
backgroundColor: Colors.transparent,
minimumSize: const Size(300, 700),
),
);
Catcher2(
enableLogger: arguments["verbose"],
debugConfig: Catcher2Options(