mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-29 20:48:40 +00:00
@@ -5,7 +5,9 @@ import 'package:PiliPlus/http/member.dart';
|
||||
import 'package:PiliPlus/http/user.dart';
|
||||
import 'package:PiliPlus/http/video.dart';
|
||||
import 'package:PiliPlus/models/common/member/tab_type.dart';
|
||||
import 'package:PiliPlus/models/model_owner.dart';
|
||||
import 'package:PiliPlus/models_new/space/space/data.dart';
|
||||
import 'package:PiliPlus/models_new/space/space/elec.dart';
|
||||
import 'package:PiliPlus/models_new/space/space/live.dart';
|
||||
import 'package:PiliPlus/models_new/space/space/setting.dart';
|
||||
import 'package:PiliPlus/models_new/space/space/tab2.dart';
|
||||
@@ -43,7 +45,13 @@ class MemberController extends CommonDataController<SpaceData, SpaceData?>
|
||||
|
||||
bool? hasSeasonOrSeries;
|
||||
|
||||
late bool hasCharge = false;
|
||||
List<ElecItem>? charges;
|
||||
int? chargeCount;
|
||||
bool get hasCharge => chargeCount != null && chargeCount! > 0;
|
||||
|
||||
List<Owner>? guards;
|
||||
Object? guardCount;
|
||||
bool get hasGuard => guards?.isNotEmpty ?? false;
|
||||
|
||||
final fromViewAid = Get.parameters['from_view_aid'];
|
||||
|
||||
@@ -58,21 +66,30 @@ class MemberController extends CommonDataController<SpaceData, SpaceData?>
|
||||
@override
|
||||
bool customHandleResponse(bool isRefresh, Success<SpaceData> response) {
|
||||
final data = response.response;
|
||||
username = data.card?.name ?? '';
|
||||
isFollowed = data.card?.relation?.isFollowed;
|
||||
hasCharge = (data.elec?.total ?? 0) > 0;
|
||||
final card = data.card;
|
||||
username = card?.name ?? '';
|
||||
isFollowed = card?.relation?.isFollowed;
|
||||
// charge
|
||||
final elec = data.elec;
|
||||
charges = elec?.list;
|
||||
chargeCount = elec?.total;
|
||||
// guard
|
||||
final guard = data.guard;
|
||||
guards = guard?.item;
|
||||
guardCount = guard?.count;
|
||||
|
||||
if (data.relation == -1) {
|
||||
relation.value = 128;
|
||||
} else {
|
||||
relation.value = data.card?.relation?.isFollow == 1
|
||||
relation.value = card?.relation?.isFollow == 1
|
||||
? data.relSpecial == 1
|
||||
? -10
|
||||
: data.card?.relation?.status ?? 2
|
||||
: card?.relation?.status ?? 2
|
||||
: 0;
|
||||
}
|
||||
tab2 = data.tab2;
|
||||
live = data.live;
|
||||
silence = data.card?.silence;
|
||||
silence = card?.silence;
|
||||
if ((data.ugcSeason?.count != null && data.ugcSeason?.count != 0) ||
|
||||
data.series?.item?.isNotEmpty == true) {
|
||||
hasSeasonOrSeries = true;
|
||||
|
||||
Reference in New Issue
Block a user