diff --git a/.github/workflows/versions.env b/.github/workflows/versions.env index 2fd07e8a..4de296eb 100644 --- a/.github/workflows/versions.env +++ b/.github/workflows/versions.env @@ -1,2 +1,2 @@ -FLUTTER_VERSION=3.16.0 +FLUTTER_VERSION=3.16.2 JAVA_VERSION=17 \ No newline at end of file diff --git a/assets/l10n/intl_en.arb b/assets/l10n/intl_en.arb index 63d50cea..e130b67c 100644 --- a/assets/l10n/intl_en.arb +++ b/assets/l10n/intl_en.arb @@ -986,26 +986,10 @@ "type": "text", "placeholders": {} }, - "ignore": "Ignore", - "@ignore": { - "type": "text", - "placeholders": {} - }, - "ignoredUsers": "Ignored users", - "@ignoredUsers": { - "type": "text", - "placeholders": {} - }, - "ignoreListDescription": "You can ignore users who are disturbing you. You won't be able to receive any messages or room invites from the users on your personal ignore list.", - "@ignoreListDescription": { - "type": "text", - "placeholders": {} - }, - "ignoreUsername": "Ignore username", - "@ignoreUsername": { - "type": "text", - "placeholders": {} - }, + "block": "block", + "blockedUsers": "Blocked users", + "blockListDescription": "You can block users who are disturbing you. You won't be able to receive any messages or room invites from the users on your personal block list.", + "blockUsername": "Ignore username", "iHaveClickedOnLink": "I have clicked on the link", "@iHaveClickedOnLink": { "type": "text", diff --git a/lib/config/routes.dart b/lib/config/routes.dart index 9d6b837e..ae4f85c9 100644 --- a/lib/config/routes.dart +++ b/lib/config/routes.dart @@ -281,10 +281,14 @@ abstract class AppRoutes { ), GoRoute( path: 'ignorelist', - pageBuilder: (context, state) => defaultPageBuilder( - context, - const SettingsIgnoreList(), - ), + pageBuilder: (context, state) { + return defaultPageBuilder( + context, + SettingsIgnoreList( + initialUserId: state.extra?.toString(), + ), + ); + }, redirect: loggedOutRedirect, ), GoRoute( diff --git a/lib/pages/settings_ignore_list/settings_ignore_list_view.dart b/lib/pages/settings_ignore_list/settings_ignore_list_view.dart index 8c7be9c4..79c21eb2 100644 --- a/lib/pages/settings_ignore_list/settings_ignore_list_view.dart +++ b/lib/pages/settings_ignore_list/settings_ignore_list_view.dart @@ -20,10 +20,12 @@ class SettingsIgnoreListView extends StatelessWidget { return Scaffold( appBar: AppBar( leading: const Center(child: BackButton()), - title: Text(L10n.of(context)!.ignoredUsers), + title: Text(L10n.of(context)!.blockedUsers), ), body: MaxWidthBody( + withScrolling: false, child: Column( + mainAxisSize: MainAxisSize.min, children: [ Padding( padding: const EdgeInsets.all(16.0), @@ -39,9 +41,9 @@ class SettingsIgnoreListView extends StatelessWidget { border: const OutlineInputBorder(), hintText: 'bad_guy:domain.abc', prefixText: '@', - labelText: L10n.of(context)!.ignoreUsername, + labelText: L10n.of(context)!.blockUsername, suffixIcon: IconButton( - tooltip: L10n.of(context)!.ignore, + tooltip: L10n.of(context)!.block, icon: const Icon(Icons.done_outlined), onPressed: () => controller.ignoreUser(context), ), @@ -49,7 +51,7 @@ class SettingsIgnoreListView extends StatelessWidget { ), const SizedBox(height: 16), Text( - L10n.of(context)!.ignoreListDescription, + L10n.of(context)!.blockListDescription, style: const TextStyle(color: Colors.orange), ), ], diff --git a/lib/pages/settings_security/settings_security_view.dart b/lib/pages/settings_security/settings_security_view.dart index 6f73d4de..c7649496 100644 --- a/lib/pages/settings_security/settings_security_view.dart +++ b/lib/pages/settings_security/settings_security_view.dart @@ -31,7 +31,7 @@ class SettingsSecurityView extends StatelessWidget { ListTile( leading: const Icon(Icons.block_outlined), trailing: const Icon(Icons.chevron_right_outlined), - title: Text(L10n.of(context)!.ignoredUsers), + title: Text(L10n.of(context)!.blockedUsers), onTap: () => context.go('/rooms/settings/security/ignorelist'), ), ListTile( diff --git a/lib/pages/user_bottom_sheet/user_bottom_sheet.dart b/lib/pages/user_bottom_sheet/user_bottom_sheet.dart index cc5b0cf8..fd34f5c4 100644 --- a/lib/pages/user_bottom_sheet/user_bottom_sheet.dart +++ b/lib/pages/user_bottom_sheet/user_bottom_sheet.dart @@ -237,7 +237,10 @@ class UserBottomSheetController extends State { widget.outerContext.go('/rooms/$roomId'); break; case UserBottomSheetAction.ignore: - context.go('/rooms/settings/security/ignorelist'); + Navigator.of(context).pop(); + final userId = user?.id ?? widget.profile?.userId; + widget.outerContext + .go('/rooms/settings/security/ignorelist', extra: userId); } } diff --git a/lib/pages/user_bottom_sheet/user_bottom_sheet_view.dart b/lib/pages/user_bottom_sheet/user_bottom_sheet_view.dart index 8f742064..874748f8 100644 --- a/lib/pages/user_bottom_sheet/user_bottom_sheet_view.dart +++ b/lib/pages/user_bottom_sheet/user_bottom_sheet_view.dart @@ -93,6 +93,7 @@ class UserBottomSheetView extends StatelessWidget { padding: const EdgeInsets.only(right: 8.0), child: IconButton( icon: const Icon(Icons.block_outlined), + tooltip: L10n.of(context)!.block, onPressed: () => controller .participantAction(UserBottomSheetAction.ignore), ), diff --git a/pubspec.lock b/pubspec.lock index a8ea28a5..02e28522 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -636,10 +636,10 @@ packages: dependency: "direct main" description: name: flutter_olm - sha256: ea8da4b76b5005b1df80ff5afd705ba17a9e2db5ac8848512d3455a88b56fb67 + sha256: "69aaac45d854e74d17d04dac8a0ca3f548266d271a0f0fa7600e006e81432417" url: "https://pub.dev" source: hosted - version: "1.4.0" + version: "1.3.2" flutter_openssl_crypto: dependency: "direct main" description: diff --git a/pubspec.yaml b/pubspec.yaml index 928dad66..9d065201 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -42,7 +42,7 @@ dependencies: sdk: flutter flutter_map: ^4.0.0 flutter_math_fork: ^0.7.2 - flutter_olm: ^1.4.0 + flutter_olm: 1.3.2 # Keep in sync with scripts/prepare-web.sh ! 1.4.0 does currently not build on Android flutter_openssl_crypto: ^0.3.0 flutter_ringtone_player: ^4.0.0+2 flutter_secure_storage: ^9.0.0 diff --git a/scripts/prepare-web.sh b/scripts/prepare-web.sh index 0c4283e6..70b15a24 100755 --- a/scripts/prepare-web.sh +++ b/scripts/prepare-web.sh @@ -1,6 +1,10 @@ #!/bin/sh -ve rm -r assets/js/package -cd assets/js/ && curl -L $(curl -s 'https://api.github.com/repos/famedly/olm/releases' | jq -r '.[0] | .assets | .[0] | .browser_download_url') > olm.zip && cd ../../ + +OLM_VERSION=$(cat pubspec.yaml | yq .dependencies.flutter_olm) +DOWNLOAD_PATH="https://github.com/famedly/olm/releases/download/v$OLM_VERSION/olm.zip" + +cd assets/js/ && curl -L $DOWNLOAD_PATH > olm.zip && cd ../../ cd assets/js/ && unzip olm.zip && cd ../../ cd assets/js/ && rm olm.zip && cd ../../ cd assets/js/ && mv javascript package && cd ../../