mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-23 10:36:24 +08:00
opt: common ctr
opt: state Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -61,14 +61,14 @@ class _SysMsgPageState extends State<SysMsgPage> {
|
||||
},
|
||||
),
|
||||
),
|
||||
Success() => loadingState.response?.isNotEmpty == true
|
||||
Success(:var response) => response?.isNotEmpty == true
|
||||
? SliverList.separated(
|
||||
itemCount: loadingState.response!.length,
|
||||
itemCount: response!.length,
|
||||
itemBuilder: (context, int index) {
|
||||
if (index == loadingState.response!.length - 1) {
|
||||
if (index == response.length - 1) {
|
||||
_sysMsgController.onLoadMore();
|
||||
}
|
||||
final item = loadingState.response![index];
|
||||
final item = response[index];
|
||||
String? content = item.content;
|
||||
if (content != null) {
|
||||
try {
|
||||
@@ -131,8 +131,8 @@ class _SysMsgPageState extends State<SysMsgPage> {
|
||||
},
|
||||
)
|
||||
: HttpError(onReload: _sysMsgController.onReload),
|
||||
Error() => HttpError(
|
||||
errMsg: loadingState.errMsg,
|
||||
Error(:var errMsg) => HttpError(
|
||||
errMsg: errMsg,
|
||||
onReload: _sysMsgController.onReload,
|
||||
),
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user