mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-11-10 22:19:30 +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>();
|
final formKey = GlobalKey<FormState>();
|
||||||
bool loading = false;
|
bool loading = false;
|
||||||
|
|
||||||
bool _hideFab = false;
|
|
||||||
|
|
||||||
// remove leading matrix.to from text field in order to simplify pasting
|
// remove leading matrix.to from text field in order to simplify pasting
|
||||||
final List<TextInputFormatter> removeMatrixToFormatters = [
|
final List<TextInputFormatter> removeMatrixToFormatters = [
|
||||||
FilteringTextInputFormatter.deny(NewPrivateChatController.prefix),
|
FilteringTextInputFormatter.deny(NewPrivateChatController.prefix),
|
||||||
FilteringTextInputFormatter.deny(NewPrivateChatController.prefixNoProtocol),
|
FilteringTextInputFormatter.deny(NewPrivateChatController.prefixNoProtocol),
|
||||||
];
|
];
|
||||||
|
|
||||||
bool get hideFab => _hideFab;
|
|
||||||
|
|
||||||
static const Set<String> supportedSigils = {'@', '!', '#'};
|
static const Set<String> supportedSigils = {'@', '!', '#'};
|
||||||
|
|
||||||
static const String prefix = 'https://matrix.to/#/';
|
static const String prefix = 'https://matrix.to/#/';
|
||||||
static const String prefixNoProtocol = '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 {
|
void submitAction([_]) async {
|
||||||
controller.text = controller.text.trim();
|
controller.text = controller.text.trim();
|
||||||
if (!formKey.currentState!.validate()) return;
|
if (!formKey.currentState!.validate()) return;
|
||||||
|
@ -109,7 +109,7 @@ class NewPrivateChatView extends StatelessWidget {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
floatingActionButtonLocation: FloatingActionButtonLocation.centerFloat,
|
floatingActionButtonLocation: FloatingActionButtonLocation.centerFloat,
|
||||||
floatingActionButton: PlatformInfos.isMobile && !controller.hideFab
|
floatingActionButton: PlatformInfos.isMobile
|
||||||
? Padding(
|
? Padding(
|
||||||
padding: const EdgeInsets.only(bottom: 64.0),
|
padding: const EdgeInsets.only(bottom: 64.0),
|
||||||
child: FloatingActionButton.extended(
|
child: FloatingActionButton.extended(
|
||||||
|
@ -28,13 +28,13 @@ class SettingsSecurityController extends State<SettingsSecurity> {
|
|||||||
cancelLabel: L10n.of(context)!.cancel,
|
cancelLabel: L10n.of(context)!.cancel,
|
||||||
textFields: [
|
textFields: [
|
||||||
DialogTextField(
|
DialogTextField(
|
||||||
hintText: L10n.of(context)!.pleaseEnterYourPassword,
|
hintText: L10n.of(context)!.chooseAStrongPassword,
|
||||||
obscureText: true,
|
obscureText: true,
|
||||||
minLines: 1,
|
minLines: 1,
|
||||||
maxLines: 1,
|
maxLines: 1,
|
||||||
),
|
),
|
||||||
DialogTextField(
|
DialogTextField(
|
||||||
hintText: L10n.of(context)!.chooseAStrongPassword,
|
hintText: L10n.of(context)!.repeatPassword,
|
||||||
obscureText: true,
|
obscureText: true,
|
||||||
minLines: 1,
|
minLines: 1,
|
||||||
maxLines: 1,
|
maxLines: 1,
|
||||||
|
Loading…
Reference in New Issue
Block a user