From c91c53dd8b0e5b1c49c388cee598ef3755f145b8 Mon Sep 17 00:00:00 2001 From: otsmr Date: Sun, 21 Dec 2025 17:19:40 +0100 Subject: [PATCH] fixed some smaller issues --- lib/src/localization/app_de.arb | 6 +- lib/src/localization/app_en.arb | 10 +- .../generated/app_localizations.dart | 20 ++- .../generated/app_localizations_de.dart | 10 +- .../generated/app_localizations_en.dart | 14 +- .../chat_list_components/group_list_item.dart | 2 +- .../message_input.dart | 159 ++++++++++-------- .../subscription/subscription.view.dart | 7 +- pubspec.yaml | 2 +- 9 files changed, 138 insertions(+), 92 deletions(-) diff --git a/lib/src/localization/app_de.arb b/lib/src/localization/app_de.arb index c5cb6f9..227ad4c 100644 --- a/lib/src/localization/app_de.arb +++ b/lib/src/localization/app_de.arb @@ -207,13 +207,15 @@ "proFeature1": "✓ Unbegrenzte Medien-Datei-Uploads", "proFeature2": "✓ 1 zusätzlicher Plus Benutzer", "proFeature3": "✓ Flammen wiederherstellen", - "proFeature4": "✓ Cloud-Backup verschlüsselt (coming-soon)", + "proFeature4": "✓ twonly unterstützen", "year": "Jahr", "month": "Monat", "yearly": "Jährlich", "monthly": "Monatlich", - "familyFeature1": "✓ Alles von Pro", + "familyFeature1": "✓ Unbegrenzte Medien-Datei-Uploads", "familyFeature2": "✓ 4 zusätzliche Plus Benutzer", + "familyFeature3": "✓ Flammen wiederherstellen", + "familyFeature4": "✓ twonly unterstützen", "redeemUserInviteCode": "Oder löse einen twonly-Code ein.", "freeFeature1": "✓ 10 Medien-Datei-Uploads pro Tag", "plusFeature1": "✓ Unbegrenzte Medien-Datei-Uploads", diff --git a/lib/src/localization/app_en.arb b/lib/src/localization/app_en.arb index a1440f8..1223c5a 100644 --- a/lib/src/localization/app_en.arb +++ b/lib/src/localization/app_en.arb @@ -240,10 +240,12 @@ "monthly": "Monthly", "proFeature1": "✓ Unlimited media file uploads", "proFeature2": "✓ 1 additional Plus user", - "proFeature3": "✓ Cloud-Backup encrypted (coming-soon)", - "proFeature4": "Additional features (coming-soon)", - "familyFeature1": "✓ All from Pro", - "familyFeature2": "✓ 4 additional Plus users", + "proFeature3": "✓ Restore flames", + "proFeature4": "✓ Support twonly", + "familyFeature1": "✓ Unlimited media file uploads", + "familyFeature2": "✓ 4 additional Plus user", + "familyFeature3": "✓ Restore flames", + "familyFeature4": "✓ Support twonly", "redeemUserInviteCode": "Or redeem a twonly-Code.", "redeemUserInviteCodeTitle": "Redeem twonly-Code", "redeemUserInviteCodeSuccess": "Your plan has been successfully adjusted.", diff --git a/lib/src/localization/generated/app_localizations.dart b/lib/src/localization/generated/app_localizations.dart index 0c16111..659b92a 100644 --- a/lib/src/localization/generated/app_localizations.dart +++ b/lib/src/localization/generated/app_localizations.dart @@ -1361,27 +1361,39 @@ abstract class AppLocalizations { /// No description provided for @proFeature3. /// /// In en, this message translates to: - /// **'✓ Cloud-Backup encrypted (coming-soon)'** + /// **'✓ Restore flames'** String get proFeature3; /// No description provided for @proFeature4. /// /// In en, this message translates to: - /// **'Additional features (coming-soon)'** + /// **'✓ Support twonly'** String get proFeature4; /// No description provided for @familyFeature1. /// /// In en, this message translates to: - /// **'✓ All from Pro'** + /// **'✓ Unlimited media file uploads'** String get familyFeature1; /// No description provided for @familyFeature2. /// /// In en, this message translates to: - /// **'✓ 4 additional Plus users'** + /// **'✓ 4 additional Plus user'** String get familyFeature2; + /// No description provided for @familyFeature3. + /// + /// In en, this message translates to: + /// **'✓ Restore flames'** + String get familyFeature3; + + /// No description provided for @familyFeature4. + /// + /// In en, this message translates to: + /// **'✓ Support twonly'** + String get familyFeature4; + /// No description provided for @redeemUserInviteCode. /// /// In en, this message translates to: diff --git a/lib/src/localization/generated/app_localizations_de.dart b/lib/src/localization/generated/app_localizations_de.dart index 0e5a1db..98b60c8 100644 --- a/lib/src/localization/generated/app_localizations_de.dart +++ b/lib/src/localization/generated/app_localizations_de.dart @@ -716,14 +716,20 @@ class AppLocalizationsDe extends AppLocalizations { String get proFeature3 => '✓ Flammen wiederherstellen'; @override - String get proFeature4 => '✓ Cloud-Backup verschlüsselt (coming-soon)'; + String get proFeature4 => '✓ twonly unterstützen'; @override - String get familyFeature1 => '✓ Alles von Pro'; + String get familyFeature1 => '✓ Unbegrenzte Medien-Datei-Uploads'; @override String get familyFeature2 => '✓ 4 zusätzliche Plus Benutzer'; + @override + String get familyFeature3 => '✓ Flammen wiederherstellen'; + + @override + String get familyFeature4 => '✓ twonly unterstützen'; + @override String get redeemUserInviteCode => 'Oder löse einen twonly-Code ein.'; diff --git a/lib/src/localization/generated/app_localizations_en.dart b/lib/src/localization/generated/app_localizations_en.dart index e42de3b..4b3f2a8 100644 --- a/lib/src/localization/generated/app_localizations_en.dart +++ b/lib/src/localization/generated/app_localizations_en.dart @@ -707,16 +707,22 @@ class AppLocalizationsEn extends AppLocalizations { String get proFeature2 => '✓ 1 additional Plus user'; @override - String get proFeature3 => '✓ Cloud-Backup encrypted (coming-soon)'; + String get proFeature3 => '✓ Restore flames'; @override - String get proFeature4 => 'Additional features (coming-soon)'; + String get proFeature4 => '✓ Support twonly'; @override - String get familyFeature1 => '✓ All from Pro'; + String get familyFeature1 => '✓ Unlimited media file uploads'; @override - String get familyFeature2 => '✓ 4 additional Plus users'; + String get familyFeature2 => '✓ 4 additional Plus user'; + + @override + String get familyFeature3 => '✓ Restore flames'; + + @override + String get familyFeature4 => '✓ Support twonly'; @override String get redeemUserInviteCode => 'Or redeem a twonly-Code.'; diff --git a/lib/src/views/chats/chat_list_components/group_list_item.dart b/lib/src/views/chats/chat_list_components/group_list_item.dart index 3e08f75..a87e7d8 100644 --- a/lib/src/views/chats/chat_list_components/group_list_item.dart +++ b/lib/src/views/chats/chat_list_components/group_list_item.dart @@ -159,7 +159,7 @@ class _UserListItem extends State { } Future onTap() async { - if (_currentMessage == null) { + if (_currentMessage == null && widget.group.totalMediaCounter == 0) { await Navigator.push( context, MaterialPageRoute( diff --git a/lib/src/views/chats/chat_messages_components/message_input.dart b/lib/src/views/chats/chat_messages_components/message_input.dart index e922bda..24d252a 100644 --- a/lib/src/views/chats/chat_messages_components/message_input.dart +++ b/lib/src/views/chats/chat_messages_components/message_input.dart @@ -113,6 +113,7 @@ class _MessageInputState extends State { } setState(() { _recordingState = RecordingState.recording; + _currentDuration = 0; }); await HapticFeedback.heavyImpact(); final audioTmpPath = @@ -220,82 +221,96 @@ class _MessageInputState extends State { ), ), Expanded( - child: (_recordingState == RecordingState.recording) - ? Row( - children: [ - const Padding( - padding: EdgeInsets.only( - top: 14, - bottom: 14, - left: 12, - right: 8, - ), - child: FaIcon( - FontAwesomeIcons.microphone, - size: 20, - color: Colors.red, - ), + child: Stack( + children: [ + TextField( + controller: _textFieldController, + focusNode: widget.textFieldFocus, + keyboardType: TextInputType.multiline, + showCursor: + _recordingState != RecordingState.recording, + maxLines: 4, + minLines: 1, + onChanged: (value) async { + setState(() {}); + await twonlyDB.groupsDao.updateGroup( + widget.group.groupId, + GroupsCompanion( + draftMessage: + Value(_textFieldController.text), ), - const SizedBox(width: 10), - Text( - formatMsToMinSec( - _currentDuration, - ), - style: const TextStyle( - color: Colors.white, - fontSize: 12, - ), - ), - if (!_audioRecordingLock) ...[ - SizedBox( - width: (100 - _cancelSlideOffset) % 101, - ), - Text( - context.lang.voiceMessageSlideToCancel, - ), - ] else ...[ - Expanded( - child: Container(), - ), - GestureDetector( - onTap: _cancelAudioRecording, - child: Text( - context.lang.voiceMessageCancel, - style: const TextStyle( - color: Colors.red, - ), + ); + }, + onSubmitted: (_) { + _sendMessage(); + }, + style: const TextStyle(fontSize: 17), + decoration: InputDecoration( + hintText: context.lang.chatListDetailInput, + contentPadding: EdgeInsets.zero, + border: InputBorder.none, + ), + ), + if (_recordingState == RecordingState.recording) + Container( + decoration: BoxDecoration( + color: context.color.surfaceContainer, + borderRadius: BorderRadius.circular(20), + ), + child: Row( + children: [ + const Padding( + padding: EdgeInsets.only( + top: 14, + bottom: 14, + left: 12, + right: 8, + ), + child: FaIcon( + FontAwesomeIcons.microphone, + size: 20, + color: Colors.red, ), ), - const SizedBox(width: 20), - ], - ], - ) - : TextField( - controller: _textFieldController, - focusNode: widget.textFieldFocus, - keyboardType: TextInputType.multiline, - maxLines: 4, - minLines: 1, - onChanged: (value) async { - setState(() {}); - await twonlyDB.groupsDao.updateGroup( - widget.group.groupId, - GroupsCompanion( - draftMessage: - Value(_textFieldController.text), + const SizedBox(width: 10), + Text( + formatMsToMinSec( + _currentDuration, + ), + style: TextStyle( + color: isDarkMode(context) + ? Colors.white + : Colors.black, + fontSize: 12, + ), ), - ); - }, - onSubmitted: (_) { - _sendMessage(); - }, - style: const TextStyle(fontSize: 17), - decoration: InputDecoration( - hintText: context.lang.chatListDetailInput, - contentPadding: EdgeInsets.zero, - border: InputBorder.none, + if (!_audioRecordingLock) ...[ + SizedBox( + width: (100 - _cancelSlideOffset) % 101, + ), + Text( + context.lang.voiceMessageSlideToCancel, + ), + ] else ...[ + Expanded( + child: Container(), + ), + GestureDetector( + onTap: _cancelAudioRecording, + child: Text( + context.lang.voiceMessageCancel, + style: const TextStyle( + color: Colors.red, + ), + ), + ), + const SizedBox(width: 20), + ], + ], ), ), + ], + ), ), if (_textFieldController.text == '') GestureDetector( @@ -355,7 +370,9 @@ class _MessageInputState extends State { height: 60, decoration: BoxDecoration( borderRadius: BorderRadius.circular(90), - color: Colors.black, + color: isDarkMode(context) + ? Colors.black + : Colors.white, ), child: const Center( child: Column( diff --git a/lib/src/views/settings/subscription/subscription.view.dart b/lib/src/views/settings/subscription/subscription.view.dart index 365d3df..feb2c24 100644 --- a/lib/src/views/settings/subscription/subscription.view.dart +++ b/lib/src/views/settings/subscription/subscription.view.dart @@ -227,14 +227,15 @@ class _PlanCardState extends State { context.lang.proFeature1, context.lang.proFeature2, context.lang.proFeature3, + context.lang.proFeature4, // context.lang.proFeature4, ]; case 'Family': features = [ - context.lang.proFeature1, + context.lang.familyFeature1, context.lang.familyFeature2, - context.lang.proFeature3, - // context.lang.proFeature4, + context.lang.familyFeature3, + context.lang.familyFeature4, ]; default: } diff --git a/pubspec.yaml b/pubspec.yaml index 17e2f00..63a5f86 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -3,7 +3,7 @@ description: "twonly, a privacy-friendly way to connect with friends through sec publish_to: 'none' -version: 0.0.77+77 +version: 0.0.78+78 environment: sdk: ^3.6.0