diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 772e3f99e..69b9e0104 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -103,7 +103,7 @@ jobs: - run: cat .github/workflows/versions.env >> $GITHUB_ENV - uses: subosito/flutter-action@v2 with: - flutter-version: 3.19.6 # Workaround for not working on 3.22 + flutter-version: ${{ env.FLUTTER_VERSION }} cache: true - name: Install dependencies run: sudo apt-get update && sudo apt-get install curl clang cmake ninja-build pkg-config libgtk-3-dev libblkid-dev liblzma-dev libjsoncpp-dev cmake-data libsecret-1-dev libsecret-1-0 librhash0 libssl-dev -y diff --git a/.github/workflows/versions.env b/.github/workflows/versions.env index eaa595930..a7af31db7 100644 --- a/.github/workflows/versions.env +++ b/.github/workflows/versions.env @@ -1,2 +1,2 @@ -FLUTTER_VERSION=3.22.3 +FLUTTER_VERSION=3.24.1 JAVA_VERSION=17 diff --git a/lib/pages/chat/add_widget_tile_view.dart b/lib/pages/chat/add_widget_tile_view.dart index d7ac53ef2..18153faba 100644 --- a/lib/pages/chat/add_widget_tile_view.dart +++ b/lib/pages/chat/add_widget_tile_view.dart @@ -59,7 +59,7 @@ class AddWidgetTileView extends StatelessWidget { ), ), ), - ButtonBar( + OverflowBar( children: [ TextButton( onPressed: controller.addWidget, diff --git a/lib/pages/chat/chat_view.dart b/lib/pages/chat/chat_view.dart index 5065bebdc..1fadd1e6c 100644 --- a/lib/pages/chat/chat_view.dart +++ b/lib/pages/chat/chat_view.dart @@ -156,7 +156,7 @@ class ChatView extends StatelessWidget { return PopScope( canPop: controller.selectedEvents.isEmpty && !controller.showEmojiPicker, - onPopInvoked: (pop) async { + onPopInvokedWithResult: (pop, _) async { if (pop) return; if (controller.selectedEvents.isNotEmpty) { controller.clearSelectedEvents(); diff --git a/lib/pages/chat_list/chat_list_view.dart b/lib/pages/chat_list/chat_list_view.dart index 0cf684fc2..2cc33da06 100644 --- a/lib/pages/chat_list/chat_list_view.dart +++ b/lib/pages/chat_list/chat_list_view.dart @@ -29,7 +29,7 @@ class ChatListView extends StatelessWidget { canPop: controller.selectMode == SelectMode.normal && !controller.isSearchMode && controller.activeSpaceId == null, - onPopInvoked: (pop) { + onPopInvokedWithResult: (pop, _) { if (pop) return; if (controller.activeSpaceId != null) { controller.clearActiveSpace(); diff --git a/linux/flutter/generated_plugin_registrant.cc b/linux/flutter/generated_plugin_registrant.cc index 0764f8001..99fe9d9d6 100644 --- a/linux/flutter/generated_plugin_registrant.cc +++ b/linux/flutter/generated_plugin_registrant.cc @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include @@ -34,6 +35,9 @@ void fl_register_plugins(FlPluginRegistry* registry) { g_autoptr(FlPluginRegistrar) flutter_webrtc_registrar = fl_plugin_registry_get_registrar_for_plugin(registry, "FlutterWebRTCPlugin"); flutter_web_r_t_c_plugin_register_with_registrar(flutter_webrtc_registrar); + g_autoptr(FlPluginRegistrar) handy_window_registrar = + fl_plugin_registry_get_registrar_for_plugin(registry, "HandyWindowPlugin"); + handy_window_plugin_register_with_registrar(handy_window_registrar); g_autoptr(FlPluginRegistrar) pasteboard_registrar = fl_plugin_registry_get_registrar_for_plugin(registry, "PasteboardPlugin"); pasteboard_plugin_register_with_registrar(pasteboard_registrar); diff --git a/linux/flutter/generated_plugins.cmake b/linux/flutter/generated_plugins.cmake index 92fe21eec..de98e488d 100644 --- a/linux/flutter/generated_plugins.cmake +++ b/linux/flutter/generated_plugins.cmake @@ -8,6 +8,7 @@ list(APPEND FLUTTER_PLUGIN_LIST file_selector_linux flutter_secure_storage_linux flutter_webrtc + handy_window pasteboard record_linux sentry_flutter diff --git a/linux/my_application.cc b/linux/my_application.cc index c185bcd78..7bddef81c 100644 --- a/linux/my_application.cc +++ b/linux/my_application.cc @@ -61,17 +61,17 @@ static void my_application_activate(GApplication* application) { } gtk_window_set_default_size(window, 864, 680); - gtk_widget_show(GTK_WIDGET(window)); g_autoptr(FlDartProject) project = fl_dart_project_new(); fl_dart_project_set_dart_entrypoint_arguments(project, self->dart_entrypoint_arguments); FlView* view = fl_view_new(project); - gtk_widget_show(GTK_WIDGET(view)); gtk_container_add(GTK_CONTAINER(window), GTK_WIDGET(view)); fl_register_plugins(FL_PLUGIN_REGISTRY(view)); + gtk_widget_show(GTK_WIDGET(window)); + gtk_widget_show(GTK_WIDGET(view)); gtk_widget_grab_focus(GTK_WIDGET(view)); } diff --git a/pubspec.lock b/pubspec.lock index e2f2ad061..817eb4eef 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -999,6 +999,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.3.2" + handy_window: + dependency: "direct main" + description: + name: handy_window + sha256: "56b813e58a68b0ee2ab22051400b8b1f1b5cfe88b8cd32288623defb3926245a" + url: "https://pub.dev" + source: hosted + version: "0.4.0" highlighter: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 7ae2e589d..ffd0995fb 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -58,6 +58,7 @@ dependencies: future_loading_dialog: ^0.3.0 geolocator: ^7.6.2 go_router: ^14.0.1 + handy_window: ^0.4.0 hive: ^2.2.3 hive_flutter: ^1.1.0 html: ^0.15.4 diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index a32ad5704..63dfbb87d 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -1,6 +1,6 @@ name: fluffychat title: FluffyChat -base: core22 +base: core24 version: git license: AGPL-3.0 summary: The cutest messenger in the Matrix network @@ -44,9 +44,11 @@ description: | grade: stable confinement: strict -architectures: - - build-on: amd64 - - build-on: arm64 +platforms: + amd64: + build-on: amd64 + arm64: + build-on: arm64 parts: olm: @@ -64,40 +66,13 @@ parts: stage-snaps: - zenity-integration - flutter-git: - source: https://github.com/flutter/flutter.git - source-tag: 3.19.6 - source-depth: 1 - plugin: nil - override-build: | - mkdir -p $CRAFT_PART_INSTALL/usr/bin - mkdir -p $CRAFT_PART_INSTALL/usr/libexec - cp -r $CRAFT_PART_SRC $CRAFT_PART_INSTALL/usr/libexec/flutter - ln -s $CRAFT_PART_INSTALL/usr/libexec/flutter/bin/flutter $CRAFT_PART_INSTALL/usr/bin/flutter - ln -s $SNAPCRAFT_PART_INSTALL/usr/libexec/flutter/bin/dart $SNAPCRAFT_PART_INSTALL/usr/bin/dart - $CRAFT_PART_INSTALL/usr/bin/flutter doctor - build-packages: - - clang - - cmake - - curl - - libgtk-3-dev - - ninja-build - - unzip - - xz-utils - - zip - override-prime: '' - fluffychat: - after: [flutter-git] - plugin: nil + plugin: flutter source: . override-build: | # Workaround for Flutter build error: rm -rf build - - flutter build linux --release -v - mkdir -p $CRAFT_PART_INSTALL/bin/ - cp -r build/linux/*/release/bundle/* $CRAFT_PART_INSTALL/bin/ + craftctl default build-packages: - libjsoncpp-dev - curl @@ -114,7 +89,7 @@ slots: apps: fluffychat: - command: bin/fluffychat + command: fluffychat extensions: [ gnome ] plugs: - audio-playback