From 70ef894ec59e345519768ef1bb06d336f328a0db Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Tue, 18 Feb 2025 23:34:59 +0800 Subject: [PATCH] :recycle: Transferable chat channel --- lib/screens/chat/manage.dart | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/screens/chat/manage.dart b/lib/screens/chat/manage.dart index 64ef2f0..2eceac2 100644 --- a/lib/screens/chat/manage.dart +++ b/lib/screens/chat/manage.dart @@ -95,6 +95,10 @@ class _ChatManageScreenState extends State { 'description': _descriptionController.text, 'is_public': _isPublic, 'is_community': _isCommunity, + if (_editingChannel != null && _belongToRealm == null) + 'new_belongs_realm': 'global' + else if (_editingChannel != null && _belongToRealm?.id != _editingChannel?.realm?.id) + 'new_belongs_realm': _belongToRealm!.alias, }; try { @@ -171,7 +175,6 @@ class _ChatManageScreenState extends State { items: [ ...(_realms?.map( (SnRealm item) => DropdownMenuItem( - enabled: _editingChannel == null || _editingChannel?.realmId == item.id, value: item, child: Row( children: [ @@ -204,7 +207,6 @@ class _ChatManageScreenState extends State { ) ?? []), DropdownMenuItem( - enabled: _editingChannel == null, value: null, child: Row( children: [