diff --git a/lib/l10n/intl_de.arb b/lib/l10n/intl_de.arb index 1ecdfc0..13e90b6 100644 --- a/lib/l10n/intl_de.arb +++ b/lib/l10n/intl_de.arb @@ -1,6 +1,7 @@ { "@@locale": "de", - "@@last_modified": "2021-06-16T23:15:48+02:00", + "@@last_modified": "2021-06-24T18:24:27+02:00", + "groupInviteSettingsWarning": "You have been invited to join a group! Please enable the Group Chat Experiment in Settings to view this Invitation.", "shutdownCwtchAction": "Shutdown Cwtch", "shutdownCwtchDialog": "Are you sure you want to shutdown Cwtch? This will close all connections, and exit the application.", "shutdownCwtchDialogTitle": "Shutdown Cwtch?", diff --git a/lib/l10n/intl_en.arb b/lib/l10n/intl_en.arb index 6b0d305..4258f85 100644 --- a/lib/l10n/intl_en.arb +++ b/lib/l10n/intl_en.arb @@ -1,6 +1,7 @@ { "@@locale": "en", - "@@last_modified": "2021-06-16T23:15:48+02:00", + "@@last_modified": "2021-06-24T18:24:27+02:00", + "groupInviteSettingsWarning": "You have been invited to join a group! Please enable the Group Chat Experiment in Settings to view this Invitation.", "shutdownCwtchAction": "Shutdown Cwtch", "shutdownCwtchDialog": "Are you sure you want to shutdown Cwtch? This will close all connections, and exit the application.", "shutdownCwtchDialogTitle": "Shutdown Cwtch?", diff --git a/lib/l10n/intl_es.arb b/lib/l10n/intl_es.arb index 2f184d1..7a9fa72 100644 --- a/lib/l10n/intl_es.arb +++ b/lib/l10n/intl_es.arb @@ -1,6 +1,7 @@ { "@@locale": "es", - "@@last_modified": "2021-06-16T23:15:48+02:00", + "@@last_modified": "2021-06-24T18:24:27+02:00", + "groupInviteSettingsWarning": "You have been invited to join a group! Please enable the Group Chat Experiment in Settings to view this Invitation.", "shutdownCwtchAction": "Shutdown Cwtch", "shutdownCwtchDialog": "Are you sure you want to shutdown Cwtch? This will close all connections, and exit the application.", "shutdownCwtchDialogTitle": "Shutdown Cwtch?", diff --git a/lib/l10n/intl_fr.arb b/lib/l10n/intl_fr.arb index fb6374e..fa6ae03 100644 --- a/lib/l10n/intl_fr.arb +++ b/lib/l10n/intl_fr.arb @@ -1,6 +1,7 @@ { "@@locale": "fr", - "@@last_modified": "2021-06-16T23:15:48+02:00", + "@@last_modified": "2021-06-24T18:24:27+02:00", + "groupInviteSettingsWarning": "You have been invited to join a group! Please enable the Group Chat Experiment in Settings to view this Invitation.", "shutdownCwtchAction": "Shutdown Cwtch", "shutdownCwtchDialog": "Are you sure you want to shutdown Cwtch? This will close all connections, and exit the application.", "shutdownCwtchDialogTitle": "Shutdown Cwtch?", diff --git a/lib/l10n/intl_it.arb b/lib/l10n/intl_it.arb index ef865b8..4fa8b15 100644 --- a/lib/l10n/intl_it.arb +++ b/lib/l10n/intl_it.arb @@ -1,6 +1,7 @@ { "@@locale": "it", - "@@last_modified": "2021-06-16T23:15:48+02:00", + "@@last_modified": "2021-06-24T18:24:27+02:00", + "groupInviteSettingsWarning": "You have been invited to join a group! Please enable the Group Chat Experiment in Settings to view this Invitation.", "shutdownCwtchAction": "Shutdown Cwtch", "shutdownCwtchDialog": "Are you sure you want to shutdown Cwtch? This will close all connections, and exit the application.", "shutdownCwtchDialogTitle": "Shutdown Cwtch?", diff --git a/lib/l10n/intl_pt.arb b/lib/l10n/intl_pt.arb index fd4c5ea..fed1c6c 100644 --- a/lib/l10n/intl_pt.arb +++ b/lib/l10n/intl_pt.arb @@ -1,6 +1,7 @@ { "@@locale": "pt", - "@@last_modified": "2021-06-16T23:15:48+02:00", + "@@last_modified": "2021-06-24T18:24:27+02:00", + "groupInviteSettingsWarning": "You have been invited to join a group! Please enable the Group Chat Experiment in Settings to view this Invitation.", "shutdownCwtchAction": "Shutdown Cwtch", "shutdownCwtchDialog": "Are you sure you want to shutdown Cwtch? This will close all connections, and exit the application.", "shutdownCwtchDialogTitle": "Shutdown Cwtch?", diff --git a/lib/main_test.dart b/lib/main_test.dart index 3bdd05c..a255189 100644 --- a/lib/main_test.dart +++ b/lib/main_test.dart @@ -13,7 +13,6 @@ import 'dart:typed_data'; import 'package:flutter_test/flutter_test.dart'; import 'package:glob/glob.dart'; -//import 'package:glob/list_local_fs.dart'; var globalSettings = Settings(Locale("en", ''), OpaqueDark()); var globalErrorHandler = ErrorHandler(); diff --git a/lib/widgets/invitationbubble.dart b/lib/widgets/invitationbubble.dart index 6fdad16..1781b18 100644 --- a/lib/widgets/invitationbubble.dart +++ b/lib/widgets/invitationbubble.dart @@ -35,6 +35,7 @@ class InvitationBubbleState extends State { isAccepted = Provider.of(context).contactList.getContact(Provider.of(context).inviteTarget) != null; var prettyDate = ""; var borderRadiousEh = 15.0; + var showGroupInvite = Provider.of(context).isExperimentEnabled(TapirGroupsExperiment); rejected = Provider.of(context).flags & 0x01 == 0x01; var myKey = Provider.of(context).profileOnion + "::" + Provider.of(context).contactHandle + "::" + Provider.of(context).messageIndex.toString(); @@ -66,14 +67,18 @@ class InvitationBubbleState extends State { return MalformedBubble(); } - var wdgMessage = fromMe + var wdgMessage = isGroup && !showGroupInvite ? + Text(AppLocalizations.of(context)!.groupInviteSettingsWarning) : + fromMe ? senderInviteChrome(AppLocalizations.of(context)!.sendAnInvitation, isGroup ? Provider.of(context).contactList.getContact(Provider.of(context).inviteTarget)!.nickname : Provider.of(context).message, myKey) : (inviteChrome(isGroup ? AppLocalizations.of(context)!.inviteToGroup : AppLocalizations.of(context)!.contactSuggestion, Provider.of(context).inviteNick, Provider.of(context).inviteTarget, myKey)); Widget wdgDecorations; - if (fromMe) { + if (isGroup && !showGroupInvite) { + wdgDecorations = Text('\u202F'); + } else if (fromMe) { wdgDecorations = MessageBubbleDecoration(ackd: Provider.of(context).ackd, errored: Provider.of(context).error, fromMe: fromMe, prettyDate: prettyDate); } else if (isAccepted) { wdgDecorations = Text(AppLocalizations.of(context)!.accepted + '\u202F'); @@ -109,7 +114,7 @@ class InvitationBubbleState extends State { child: Padding( padding: EdgeInsets.all(9.0), child: Wrap(runAlignment: WrapAlignment.spaceEvenly, alignment: WrapAlignment.spaceEvenly, runSpacing: 1.0, crossAxisAlignment: WrapCrossAlignment.center, children: [ - Center(widthFactor: 1, child: Padding(padding: EdgeInsets.all(10.0), child: Icon(CwtchIcons.send_invite, size: 32))), + Center(widthFactor: 1, child: Padding(padding: EdgeInsets.all(10.0), child: Icon(isGroup && !showGroupInvite ? CwtchIcons.enable_experiments : CwtchIcons.send_invite, size: 32))), Center( widthFactor: 1.0, child: Column( diff --git a/pubspec.lock b/pubspec.lock index c59f48b..0a2c434 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -1,13 +1,6 @@ # Generated by pub # See https://dart.dev/tools/pub/glossary#lockfile packages: - archive: - dependency: transitive - description: - name: archive - url: "https://pub.dartlang.org" - source: hosted - version: "3.1.2" args: dependency: transitive description: @@ -42,7 +35,7 @@ packages: name: charcode url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" + version: "1.3.1" clock: dependency: transitive description: @@ -57,13 +50,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.15.0" - crypto: - dependency: transitive - description: - name: crypto - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.1" cupertino_icons: dependency: "direct main" description: @@ -111,11 +97,6 @@ packages: description: flutter source: sdk version: "0.0.0" - flutter_driver: - dependency: "direct main" - description: flutter - source: sdk - version: "0.0.0" flutter_localizations: dependency: "direct main" description: flutter @@ -131,11 +112,6 @@ packages: description: flutter source: sdk version: "0.0.0" - fuchsia_remote_debug_protocol: - dependency: transitive - description: flutter - source: sdk - version: "0.0.0" glob: dependency: "direct main" description: @@ -157,13 +133,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "4.0.0" - integration_test: - dependency: "direct main" - description: - name: integration_test - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.2+3" intl: dependency: transitive description: @@ -372,13 +341,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.1.0" - sync_http: - dependency: transitive - description: - name: sync_http - url: "https://pub.dartlang.org" - source: hosted - version: "0.3.0" term_glyph: dependency: transitive description: @@ -392,7 +354,7 @@ packages: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.4.0" + version: "0.4.1" typed_data: dependency: transitive description: @@ -407,20 +369,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.1.0" - vm_service: - dependency: transitive - description: - name: vm_service - url: "https://pub.dartlang.org" - source: hosted - version: "6.2.0" - webdriver: - dependency: transitive - description: - name: webdriver - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.0" win32: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 7e0eca9..3b65011 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -37,13 +37,8 @@ dependencies: desktop_notifications: 0.5.0 glob: any -# todo: flutter_driver causes version conflict. eg https://github.com/flutter/flutter/issues/44829 -# testing-related deps - integration_test: ^1.0.0 flutter_test: sdk: flutter - flutter_driver: - sdk: flutter dev_dependencies: msix: ^2.1.3