mod: history

This commit is contained in:
guozhigq
2023-08-20 15:26:10 +08:00
parent 83341cd62b
commit 7bb7159d48
3 changed files with 19 additions and 17 deletions

View File

@ -121,7 +121,7 @@ class HisListItem {
viewAt = json['view_at']; viewAt = json['view_at'];
progress = json['progress']; progress = json['progress'];
badge = json['badge']; badge = json['badge'];
showTitle = json['show_title']; showTitle = json['show_title'] == '' ? null : json['show_title'];
duration = json['duration']; duration = json['duration'];
current = json['current']; current = json['current'];
total = json['total']; total = json['total'];

View File

@ -102,8 +102,7 @@ class _HistoryPageState extends State<HistoryPage> {
Map data = snapshot.data; Map data = snapshot.data;
if (data['status']) { if (data['status']) {
return Obx( return Obx(
() => _historyController.historyList.isNotEmpty && () => _historyController.historyList.isNotEmpty
!_historyController.isLoadingMore.value
? SliverList( ? SliverList(
delegate: SliverChildBuilderDelegate( delegate: SliverChildBuilderDelegate(
(context, index) { (context, index) {

View File

@ -37,8 +37,8 @@ class HistoryItem extends StatelessWidget {
'pageTitle': videoItem.title 'pageTitle': videoItem.title
}, },
); );
} else if (videoItem.history.business == 'live' && } else if (videoItem.history.business == 'live') {
videoItem.liveStatus == 1) { if (videoItem.liveStatus == 1) {
LiveItemModel liveItem = LiveItemModel.fromJson({ LiveItemModel liveItem = LiveItemModel.fromJson({
'face': videoItem.authorFace, 'face': videoItem.authorFace,
'roomid': videoItem.history.oid, 'roomid': videoItem.history.oid,
@ -51,6 +51,9 @@ class HistoryItem extends StatelessWidget {
'/liveRoom?roomid=${videoItem.history.oid}', '/liveRoom?roomid=${videoItem.history.oid}',
arguments: {'liveItem': liveItem}, arguments: {'liveItem': liveItem},
); );
} else {
SmartDialog.showToast('直播未开播');
}
} else if (videoItem.badge == '番剧' || } else if (videoItem.badge == '番剧' ||
videoItem.tagName.contains('动画')) { videoItem.tagName.contains('动画')) {
/// hack /// hack