Merge pull request #219 from pangeachat/limit-name-length

Limit name length
pull/1183/head
ggurdin 2 years ago committed by GitHub
commit c0a56a3ee6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -57,6 +57,9 @@ class NewGroupView extends StatelessWidget {
const SizedBox(width: 16), const SizedBox(width: 16),
Expanded( Expanded(
child: TextField( child: TextField(
// #Pangea
maxLength: 32,
// Pangea#
controller: controller.nameController, controller: controller.nameController,
autocorrect: false, autocorrect: false,
readOnly: controller.loading, readOnly: controller.loading,

@ -95,6 +95,9 @@ class NewSpaceView extends StatelessWidget {
const SizedBox(width: 16), const SizedBox(width: 16),
Expanded( Expanded(
child: TextField( child: TextField(
// #Pangea
maxLength: 32,
// Pangea#
controller: controller.nameController, controller: controller.nameController,
autocorrect: false, autocorrect: false,
readOnly: controller.loading, readOnly: controller.loading,

@ -42,6 +42,9 @@ class SettingsController extends State<Settings> {
cancelLabel: L10n.of(context)!.cancel, cancelLabel: L10n.of(context)!.cancel,
textFields: [ textFields: [
DialogTextField( DialogTextField(
// #Pangea
maxLength: 32,
// Pangea#
initialText: profile?.displayName ?? initialText: profile?.displayName ??
Matrix.of(context).client.userID!.localpart, Matrix.of(context).client.userID!.localpart,
), ),

@ -27,6 +27,7 @@ void setClassDisplayname(BuildContext context, String? roomId) async {
: L10n.of(context)!.changeTheNameOfTheChat, : L10n.of(context)!.changeTheNameOfTheChat,
), ),
content: TextField( content: TextField(
maxLength: 32,
controller: textFieldController, controller: textFieldController,
), ),
actions: [ actions: [

Loading…
Cancel
Save