mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-12-24 14:32:37 +01:00
chore: Minor lable fixes
This commit is contained in:
parent
ee3351f643
commit
7436cb4aa8
@ -25,39 +25,17 @@ class NewPrivateChatController extends State<NewPrivateChat> {
|
||||
final formKey = GlobalKey<FormState>();
|
||||
bool loading = false;
|
||||
|
||||
bool _hideFab = false;
|
||||
|
||||
// remove leading matrix.to from text field in order to simplify pasting
|
||||
final List<TextInputFormatter> removeMatrixToFormatters = [
|
||||
FilteringTextInputFormatter.deny(NewPrivateChatController.prefix),
|
||||
FilteringTextInputFormatter.deny(NewPrivateChatController.prefixNoProtocol),
|
||||
];
|
||||
|
||||
bool get hideFab => _hideFab;
|
||||
|
||||
static const Set<String> 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;
|
||||
|
@ -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(
|
||||
|
@ -28,13 +28,13 @@ class SettingsSecurityController extends State<SettingsSecurity> {
|
||||
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,
|
||||
|
Loading…
Reference in New Issue
Block a user