Browse Source

GroupChat: fix create local group

pull/18/head
Sun 4 years ago
parent
commit
e542e8e392
  1. 3
      lib/apps/file/models.dart
  2. 16
      lib/apps/group_chat/add.dart

3
lib/apps/file/models.dart

@ -108,6 +108,9 @@ const Map<String, FileType> FILE_TYPES = {
'md': FileType.Markdown, 'md': FileType.Markdown,
'mp4': FileType.Video, 'mp4': FileType.Video,
'mp3': FileType.Music, 'mp3': FileType.Music,
'm4a': FileType.Music,
'flac': FileType.Music,
'wav': FileType.Music,
}; };
enum FileType { enum FileType {

16
lib/apps/group_chat/add.dart

@ -204,13 +204,15 @@ class _GroupAddPageState extends State<GroupAddPage> {
} }
_create() { _create() {
if (!this._providers.containsKey(this._providerSelected)) { String addr = '';
return; if (_groupLocation == 0) {
} if (!this._providers.containsKey(this._providerSelected)) {
return;
final addr = this._providers[this._providerSelected]!.addr; }
if (_groupLocation == 0 && addr.length < 2) { addr = this._providers[this._providerSelected]!.addr;
return; if (addr.length < 2) {
return;
}
} }
final name = _createNameController.text.trim(); final name = _createNameController.text.trim();
final bio = _createBioController.text.trim(); final bio = _createBioController.text.trim();

Loading…
Cancel
Save