Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2026-01-02 12:05:31 +08:00
parent 80e007bac6
commit 041af37bb0
67 changed files with 775 additions and 838 deletions

View File

@@ -77,15 +77,14 @@ class DynamicsController extends GetxController
final res = await DynamicsHttp.dynUpList(upState.value.data.offset);
if (res.isSuccess) {
final data = res.data;
if (data.hasMore == false || data.offset.isNullOrEmpty) {
if (res case Success(:final response)) {
if (response.hasMore == false || response.offset.isNullOrEmpty) {
_upEnd = true;
}
final upData = upState.value.data
..hasMore = data.hasMore
..offset = data.offset;
final list = data.upList;
..hasMore = response.hasMore
..offset = response.offset;
final list = response.upList;
if (list != null && list.isNotEmpty) {
upData.upList.addAll(list);
upState.refresh();
@@ -106,9 +105,9 @@ class DynamicsController extends GetxController
ps: 50,
);
if (res.isSuccess) {
if (res case Success(:final response)) {
_upPage++;
final list = res.data.list;
final list = response.list;
if (list.isEmpty) {
_upEnd = true;
}
@@ -149,11 +148,11 @@ class DynamicsController extends GetxController
]);
final first = res.first;
if (first.isSuccess) {
FollowUpModel data = first.data as FollowUpModel;
if (first case final Success<FollowUpModel> i) {
final data = i.response;
final second = res.getOrNull(1);
if (second != null && second.isSuccess) {
FollowData data1 = second.data as FollowData;
if (second case final Success<FollowData> j) {
final data1 = j.response;
final list1 = data1.list;
_upPage++;