mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-20 11:08:03 +08:00
tweaks (#1780)
* opt: sized * fix: self send * feat: ctrl enter to send * opt: checked * opt: download notifier * opt: Future.syncValue * mod: account * mod: loading state * opt: DebounceStreamMixin * opt: report * opt: enum map * opt: file handler * opt: dyn color * opt: Uint8List subview * opt: FileExt * opt: computeLuminance * opt: isNullOrEmpty * opt: Get context * update [skip ci] Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me> * opt dynamicColor [skip ci] Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me> * fixes [skip ci] * update Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me> * update Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me> --------- Signed-off-by: My-Responsitories <107370289+My-Responsitories@users.noreply.github.com> Co-authored-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
committed by
GitHub
parent
02e0d34127
commit
ce5e85e64b
@@ -8,7 +8,6 @@ import 'package:PiliPlus/models_new/pgc/pgc_index_result/list.dart';
|
||||
import 'package:PiliPlus/models_new/pgc/pgc_timeline/result.dart';
|
||||
import 'package:PiliPlus/pages/common/common_list_controller.dart';
|
||||
import 'package:PiliPlus/services/account_service.dart';
|
||||
import 'package:PiliPlus/utils/extension/iterable_ext.dart';
|
||||
import 'package:PiliPlus/utils/extension/scroll_controller_ext.dart';
|
||||
import 'package:PiliPlus/utils/storage_pref.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
@@ -108,7 +107,7 @@ class PgcController
|
||||
List<FavPgcItemModel>? list = data.list;
|
||||
followCount.value = data.total ?? -1;
|
||||
|
||||
if (list.isNullOrEmpty) {
|
||||
if (list == null || list.isEmpty) {
|
||||
followEnd = true;
|
||||
if (isRefresh) {
|
||||
followState.value = Success(list);
|
||||
@@ -118,13 +117,13 @@ class PgcController
|
||||
}
|
||||
|
||||
if (isRefresh) {
|
||||
if (list!.length >= followCount.value) {
|
||||
if (list.length >= followCount.value) {
|
||||
followEnd = true;
|
||||
}
|
||||
followState.value = Success(list);
|
||||
followController?.animToTop();
|
||||
} else if (followState.value.isSuccess) {
|
||||
final currentList = followState.value.data!..addAll(list!);
|
||||
final currentList = followState.value.data!..addAll(list);
|
||||
if (currentList.length >= followCount.value) {
|
||||
followEnd = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user