show msg user live status

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-07-18 20:55:45 +08:00
parent f7184aff4e
commit 610ed02dd4
3 changed files with 19 additions and 3 deletions

View File

@@ -110,6 +110,7 @@ class WhisperSessionItem extends StatelessWidget {
'face': avatar, 'face': avatar,
if (item.sessionInfo.avatar.hasMid()) if (item.sessionInfo.avatar.hasMid())
'mid': item.sessionInfo.avatar.mid.toInt(), 'mid': item.sessionInfo.avatar.mid.toInt(),
'isLive': item.sessionInfo.isLive,
}, },
); );
return; return;
@@ -214,7 +215,11 @@ class WhisperSessionItem extends StatelessWidget {
text: item.sessionInfo.userLabel.style.borderedLabel.text, text: item.sessionInfo.userLabel.style.borderedLabel.text,
), ),
if (item.sessionInfo.isLive) if (item.sessionInfo.isLive)
Image.asset('assets/images/live/live.gif', height: 15), Image.asset(
'assets/images/live/live.gif',
height: 15,
filterQuality: FilterQuality.low,
),
], ],
), ),
), ),

View File

@@ -23,6 +23,7 @@ class WhisperDetailController extends CommonListController<RspSessionMsg, Msg> {
final String name = Get.arguments['name']; final String name = Get.arguments['name'];
final String face = Get.arguments['face']; final String face = Get.arguments['face'];
final int? mid = Get.arguments['mid']; final int? mid = Get.arguments['mid'];
final bool isLive = Get.arguments['isLive'];
Int64? msgSeqno; Int64? msgSeqno;

View File

@@ -82,14 +82,24 @@ class _WhisperDetailPageState
src: _whisperDetailController.face, src: _whisperDetailController.face,
), ),
const SizedBox(width: 6), const SizedBox(width: 6),
Expanded( Flexible(
child: Text( child: Text(
_whisperDetailController.name, _whisperDetailController.name,
maxLines: 1, maxLines: 1,
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
style: theme.textTheme.titleMedium, style: const TextStyle(height: 1, fontSize: 16),
strutStyle:
const StrutStyle(leading: 0, height: 1, fontSize: 16),
), ),
), ),
if (_whisperDetailController.isLive) ...[
const SizedBox(width: 10),
Image.asset(
'assets/images/live/live.gif',
height: 16,
filterQuality: FilterQuality.low,
),
],
], ],
), ),
), ),