mirror of
https://github.com/krille-chan/fluffychat
synced 2024-09-10 09:45:14 +00:00
chore: Minor lable fixes
This commit is contained in:
parent
49b541930a
commit
25b44f2822
3 changed files with 3 additions and 25 deletions
|
@ -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 a new issue