mod: 直播用户过滤
This commit is contained in:
@ -70,10 +70,10 @@ class LiveController extends GetxController {
|
|||||||
Future fetchLiveFollowing() async {
|
Future fetchLiveFollowing() async {
|
||||||
var res = await LiveHttp.liveFollowing(pn: 1, ps: 20);
|
var res = await LiveHttp.liveFollowing(pn: 1, ps: 20);
|
||||||
if (res['status']) {
|
if (res['status']) {
|
||||||
liveFollowingList.value = (res['data'].list
|
liveFollowingList.value =
|
||||||
as List<LiveFollowingItemModel>)
|
(res['data'].list as List<LiveFollowingItemModel>)
|
||||||
.where(
|
.where((LiveFollowingItemModel item) =>
|
||||||
(LiveFollowingItemModel item) => item.liveStatus == 1) // 根据条件过滤
|
item.liveStatus == 1 && item.recordLiveTime == 0) // 根据条件过滤
|
||||||
.toList();
|
.toList();
|
||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
|
|||||||
@ -201,6 +201,7 @@ class _LivePageState extends State<LivePage>
|
|||||||
Map? data = snapshot.data;
|
Map? data = snapshot.data;
|
||||||
if (data?['status']) {
|
if (data?['status']) {
|
||||||
RxList list = _liveController.liveFollowingList;
|
RxList list = _liveController.liveFollowingList;
|
||||||
|
// ignore: invalid_use_of_protected_member
|
||||||
return Obx(() => LiveFollowingListView(list: list.value));
|
return Obx(() => LiveFollowingListView(list: list.value));
|
||||||
} else {
|
} else {
|
||||||
return HttpError(
|
return HttpError(
|
||||||
|
|||||||
Reference in New Issue
Block a user