diff --git a/lib/pages/video/detail/controller.dart b/lib/pages/video/detail/controller.dart index ebd049c03..65d19aaac 100644 --- a/lib/pages/video/detail/controller.dart +++ b/lib/pages/video/detail/controller.dart @@ -926,7 +926,7 @@ class VideoDetailController extends GetxController if (isPlaying) { await plPlayerController.pause(); } - await Navigator.of(Get.context!).push( + Navigator.of(Get.context!).push( GetDialogRoute( pageBuilder: (buildContext, animation, secondaryAnimation) { return SendDanmakuPanel( diff --git a/lib/pages/whisper/controller.dart b/lib/pages/whisper/controller.dart index 91a4ba98c..f20490b71 100644 --- a/lib/pages/whisper/controller.dart +++ b/lib/pages/whisper/controller.dart @@ -117,7 +117,13 @@ class WhisperController extends GetxController { if (accountInfo != null) { i.accountInfo = accountInfo; } - if (i.talkerId == 844424930131966) { + if (i.talkerId == 0) { + i.accountInfo = AccountListModel( + name: '客服消息', + face: + 'https://i0.hdslb.com/bfs/activity-plat/static/20230809/f87fc7ea98282a4dd48ec7743044b0bf/OWdoP9ZXAX.png', + ); + } else if (i.talkerId == 844424930131966) { i.accountInfo = AccountListModel( name: 'UP主小助手', face: diff --git a/lib/pages/whisper/view.dart b/lib/pages/whisper/view.dart index 44c683cf6..894cb54be 100644 --- a/lib/pages/whisper/view.dart +++ b/lib/pages/whisper/view.dart @@ -244,14 +244,17 @@ class _WhisperPageState extends State { Get.toNamed( '/whisperDetail', parameters: { - 'talkerId': sessionList[i] - .talkerId - .toString(), - 'name': - sessionList[i].accountInfo.name, - 'face': - sessionList[i].accountInfo.face, - if (sessionList[i].accountInfo.mid != + 'talkerId': + '${sessionList[i].talkerId}', + 'name': sessionList[i] + .accountInfo + ?.name ?? + '', + 'face': sessionList[i] + .accountInfo + ?.face ?? + '', + if (sessionList[i].accountInfo?.mid != null) 'mid': sessionList[i] .accountInfo @@ -281,16 +284,18 @@ class _WhisperPageState extends State { ), title: Text( sessionList[i].accountInfo?.name ?? ""), - subtitle: Text(content, - maxLines: 1, - overflow: TextOverflow.ellipsis, - style: Theme.of(context) - .textTheme - .labelMedium! - .copyWith( - color: Theme.of(context) - .colorScheme - .outline)), + subtitle: Text( + '$content', + maxLines: 1, + overflow: TextOverflow.ellipsis, + style: Theme.of(context) + .textTheme + .labelMedium! + .copyWith( + color: Theme.of(context) + .colorScheme + .outline), + ), trailing: Text( Utils.dateFormat( sessionList[i].lastMsg.timestamp,