🐛 Bug fixes

This commit is contained in:
LittleSheep 2024-08-20 01:19:18 +08:00
parent 253cd1ecbd
commit 3ac510c4b1
6 changed files with 9 additions and 1 deletions

View File

@ -400,6 +400,7 @@ class ChatCallProvider extends GetxController {
} }
void disposeRoom() { void disposeRoom() {
isBusy.value = false;
isMounted.value = false; isMounted.value = false;
isInitialized.value = false; isInitialized.value = false;
current.value = null; current.value = null;

View File

@ -246,7 +246,8 @@ class _CallScreenState extends State<CallScreen> with TickerProviderStateMixin {
return Row( return Row(
children: [ children: [
Text( Text(
call.channel.value!.name, call.channel.value?.name ??
'unknown'.tr,
style: const TextStyle( style: const TextStyle(
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),

View File

@ -380,4 +380,5 @@ const i18nEnglish = {
'messageOutOfSyncCaption': 'messageOutOfSyncCaption':
'Since the App has entered the background, there may be a time difference between the message list and the server. Click to Refresh.', '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', 'messageHistoryWipe': 'Wipe local message history',
'unknown': 'Unknown',
}; };

View File

@ -346,4 +346,5 @@ const i18nSimplifiedChinese = {
'messageOutOfSync': '消息可能与服务器脱节', 'messageOutOfSync': '消息可能与服务器脱节',
'messageOutOfSyncCaption': '由于 App 进入后台,消息列表可能与服务器存在时差,点击刷新。', 'messageOutOfSyncCaption': '由于 App 进入后台,消息列表可能与服务器存在时差,点击刷新。',
'messageHistoryWipe': '清除消息记录', 'messageHistoryWipe': '清除消息记录',
'unknown': '未知',
}; };

View File

@ -31,6 +31,7 @@ class ChannelCallIndicator extends StatelessWidget {
builder: (context) => ChatCallPrejoinPopup( builder: (context) => ChatCallPrejoinPopup(
ongoingCall: ongoingCall, ongoingCall: ongoingCall,
channel: channel, channel: channel,
onJoin: onJoin,
), ),
); );
} }

View File

@ -11,11 +11,13 @@ import 'package:solian/providers/call.dart';
class ChatCallPrejoinPopup extends StatefulWidget { class ChatCallPrejoinPopup extends StatefulWidget {
final Call ongoingCall; final Call ongoingCall;
final Channel channel; final Channel channel;
final Function onJoin;
const ChatCallPrejoinPopup({ const ChatCallPrejoinPopup({
super.key, super.key,
required this.ongoingCall, required this.ongoingCall,
required this.channel, required this.channel,
required this.onJoin,
}); });
@override @override
@ -56,6 +58,7 @@ class _ChatCallPrejoinPopupState extends State<ChatCallPrejoinPopup> {
context.showErrorDialog(e); context.showErrorDialog(e);
} }
widget.onJoin();
setState(() => _isBusy = false); setState(() => _isBusy = false);
} }