chore: disable creation of space with empty name (#1986)
This commit is contained in:
parent
1155c02b3f
commit
f149c80e63
1 changed files with 7 additions and 0 deletions
|
|
@ -2,6 +2,7 @@ import 'dart:typed_data';
|
|||
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:flutter_gen/gen_l10n/l10n.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
import 'package:matrix/matrix.dart' as sdk;
|
||||
import 'package:matrix/matrix.dart';
|
||||
|
|
@ -202,6 +203,12 @@ class NewGroupController extends State<NewGroup> {
|
|||
final client = Matrix.of(context).client;
|
||||
|
||||
try {
|
||||
if (nameController.text.trim().isEmpty &&
|
||||
createGroupType == CreateGroupType.space) {
|
||||
setState(() => error = L10n.of(context).pleaseFillOut);
|
||||
return;
|
||||
}
|
||||
|
||||
setState(() {
|
||||
loading = true;
|
||||
error = null;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue