From 83e238551c19ac982ef98548ab0e1fc84af8625c Mon Sep 17 00:00:00 2001 From: Christian Pauly Date: Sun, 17 Jan 2021 08:05:34 +0100 Subject: [PATCH] fix: Change size --- lib/views/loading_view.dart | 6 ++++++ linux/flutter/CMakeLists.txt | 1 + linux/my_application.cc | 2 +- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/views/loading_view.dart b/lib/views/loading_view.dart index e12fd2f8..eaf7d0ee 100644 --- a/lib/views/loading_view.dart +++ b/lib/views/loading_view.dart @@ -1,8 +1,14 @@ +import 'package:adaptive_page_layout/adaptive_page_layout.dart'; +import 'package:fluffychat/components/matrix.dart'; import 'package:flutter/material.dart'; class LoadingView extends StatelessWidget { @override Widget build(BuildContext context) { + if (Matrix.of(context).loginState != null) { + WidgetsBinding.instance.addPostFrameCallback((_) => + AdaptivePageLayout.of(context).pushNamedAndRemoveAllOthers('/')); + } return Scaffold( body: Center( child: CircularProgressIndicator(), diff --git a/linux/flutter/CMakeLists.txt b/linux/flutter/CMakeLists.txt index 510701c7..a1da1b9e 100644 --- a/linux/flutter/CMakeLists.txt +++ b/linux/flutter/CMakeLists.txt @@ -83,6 +83,7 @@ add_custom_command( ${FLUTTER_TOOL_ENVIRONMENT} "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.sh" linux-x64 ${CMAKE_BUILD_TYPE} + VERBATIM ) add_custom_target(flutter_assemble DEPENDS "${FLUTTER_LIBRARY}" diff --git a/linux/my_application.cc b/linux/my_application.cc index 41199f94..196e0796 100644 --- a/linux/my_application.cc +++ b/linux/my_application.cc @@ -48,7 +48,7 @@ static void my_application_activate(GApplication* application) { gtk_window_set_title(window, "fluffychat"); } - gtk_window_set_default_size(window, 802, 520); + gtk_window_set_default_size(window, 1280, 720); gtk_widget_show(GTK_WIDGET(window)); g_autoptr(FlDartProject) project = fl_dart_project_new();