From 7436cb4aa8d1b33ae896518b07f308f9adb74b7e Mon Sep 17 00:00:00 2001 From: Krille Date: Fri, 30 Dec 2022 17:45:58 +0100 Subject: [PATCH] chore: Minor lable fixes --- .../new_private_chat/new_private_chat.dart | 22 ------------------- .../new_private_chat_view.dart | 2 +- .../settings_security/settings_security.dart | 4 ++-- 3 files changed, 3 insertions(+), 25 deletions(-) diff --git a/lib/pages/new_private_chat/new_private_chat.dart b/lib/pages/new_private_chat/new_private_chat.dart index d4470a5b..c40d0092 100644 --- a/lib/pages/new_private_chat/new_private_chat.dart +++ b/lib/pages/new_private_chat/new_private_chat.dart @@ -25,39 +25,17 @@ class NewPrivateChatController extends State { final formKey = GlobalKey(); bool loading = false; - bool _hideFab = false; - // remove leading matrix.to from text field in order to simplify pasting final List removeMatrixToFormatters = [ FilteringTextInputFormatter.deny(NewPrivateChatController.prefix), FilteringTextInputFormatter.deny(NewPrivateChatController.prefixNoProtocol), ]; - bool get hideFab => _hideFab; - static const Set supportedSigils = {'@', '!', '#'}; static const String prefix = 'https://matrix.to/#/'; static const String prefixNoProtocol = 'matrix.to/#/'; - void setHideFab() { - if (textFieldFocus.hasFocus != _hideFab) { - setState(() => _hideFab = textFieldFocus.hasFocus); - } - } - - @override - void initState() { - super.initState(); - textFieldFocus.addListener(setHideFab); - } - - @override - void dispose() { - textFieldFocus.removeListener(setHideFab); - super.dispose(); - } - void submitAction([_]) async { controller.text = controller.text.trim(); if (!formKey.currentState!.validate()) return; diff --git a/lib/pages/new_private_chat/new_private_chat_view.dart b/lib/pages/new_private_chat/new_private_chat_view.dart index bb2c5658..93361f56 100644 --- a/lib/pages/new_private_chat/new_private_chat_view.dart +++ b/lib/pages/new_private_chat/new_private_chat_view.dart @@ -109,7 +109,7 @@ class NewPrivateChatView extends StatelessWidget { ], ), floatingActionButtonLocation: FloatingActionButtonLocation.centerFloat, - floatingActionButton: PlatformInfos.isMobile && !controller.hideFab + floatingActionButton: PlatformInfos.isMobile ? Padding( padding: const EdgeInsets.only(bottom: 64.0), child: FloatingActionButton.extended( diff --git a/lib/pages/settings_security/settings_security.dart b/lib/pages/settings_security/settings_security.dart index a27e42ef..40c867f1 100644 --- a/lib/pages/settings_security/settings_security.dart +++ b/lib/pages/settings_security/settings_security.dart @@ -28,13 +28,13 @@ class SettingsSecurityController extends State { cancelLabel: L10n.of(context)!.cancel, textFields: [ DialogTextField( - hintText: L10n.of(context)!.pleaseEnterYourPassword, + hintText: L10n.of(context)!.chooseAStrongPassword, obscureText: true, minLines: 1, maxLines: 1, ), DialogTextField( - hintText: L10n.of(context)!.chooseAStrongPassword, + hintText: L10n.of(context)!.repeatPassword, obscureText: true, minLines: 1, maxLines: 1,