diff --git a/lib/providers/call.dart b/lib/providers/call.dart index bbc9fbb..0d60efd 100644 --- a/lib/providers/call.dart +++ b/lib/providers/call.dart @@ -400,6 +400,7 @@ class ChatCallProvider extends GetxController { } void disposeRoom() { + isBusy.value = false; isMounted.value = false; isInitialized.value = false; current.value = null; diff --git a/lib/screens/channel/call/call.dart b/lib/screens/channel/call/call.dart index a690f20..ba17314 100644 --- a/lib/screens/channel/call/call.dart +++ b/lib/screens/channel/call/call.dart @@ -246,7 +246,8 @@ class _CallScreenState extends State with TickerProviderStateMixin { return Row( children: [ Text( - call.channel.value!.name, + call.channel.value?.name ?? + 'unknown'.tr, style: const TextStyle( fontWeight: FontWeight.bold, ), diff --git a/lib/translations/en_us.dart b/lib/translations/en_us.dart index cbfbeb6..a91e332 100644 --- a/lib/translations/en_us.dart +++ b/lib/translations/en_us.dart @@ -380,4 +380,5 @@ const i18nEnglish = { 'messageOutOfSyncCaption': 'Since the App has entered the background, there may be a time difference between the message list and the server. Click to Refresh.', 'messageHistoryWipe': 'Wipe local message history', + 'unknown': 'Unknown', }; diff --git a/lib/translations/zh_cn.dart b/lib/translations/zh_cn.dart index ecb73d2..7f54f02 100644 --- a/lib/translations/zh_cn.dart +++ b/lib/translations/zh_cn.dart @@ -346,4 +346,5 @@ const i18nSimplifiedChinese = { 'messageOutOfSync': '消息可能与服务器脱节', 'messageOutOfSyncCaption': '由于 App 进入后台,消息列表可能与服务器存在时差,点击刷新。', 'messageHistoryWipe': '清除消息记录', + 'unknown': '未知', }; diff --git a/lib/widgets/channel/channel_call_indicator.dart b/lib/widgets/channel/channel_call_indicator.dart index ef57ead..9cb050a 100644 --- a/lib/widgets/channel/channel_call_indicator.dart +++ b/lib/widgets/channel/channel_call_indicator.dart @@ -31,6 +31,7 @@ class ChannelCallIndicator extends StatelessWidget { builder: (context) => ChatCallPrejoinPopup( ongoingCall: ongoingCall, channel: channel, + onJoin: onJoin, ), ); } diff --git a/lib/widgets/chat/call/call_prejoin.dart b/lib/widgets/chat/call/call_prejoin.dart index 61efc36..9fe1509 100644 --- a/lib/widgets/chat/call/call_prejoin.dart +++ b/lib/widgets/chat/call/call_prejoin.dart @@ -11,11 +11,13 @@ import 'package:solian/providers/call.dart'; class ChatCallPrejoinPopup extends StatefulWidget { final Call ongoingCall; final Channel channel; + final Function onJoin; const ChatCallPrejoinPopup({ super.key, required this.ongoingCall, required this.channel, + required this.onJoin, }); @override @@ -56,6 +58,7 @@ class _ChatCallPrejoinPopupState extends State { context.showErrorDialog(e); } + widget.onJoin(); setState(() => _isBusy = false); }