opt: viewpoints page

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-03-09 10:04:18 +08:00
parent 0408b27ca5
commit 847ac80d5f
5 changed files with 99 additions and 103 deletions

View File

@@ -17,17 +17,19 @@ class SysMsgController extends CommonController {
@override
List? handleListResponse(List currentList, List dataList) {
if (cursor == -1) {
msgSysUpdateCursor(dataList.first.cursor!);
msgSysUpdateCursor(dataList.firstOrNull?.cursor);
}
cursor = dataList.last.cursor ?? -1;
cursor = dataList.lastOrNull?.cursor ?? -1;
if (isEnd.not && dataList.length + 1 < pageSize) {
isEnd = true;
}
return null;
}
Future msgSysUpdateCursor(int cursor) async {
MsgHttp.msgSysUpdateCursor(cursor);
Future msgSysUpdateCursor(int? cursor) async {
if (cursor != null) {
MsgHttp.msgSysUpdateCursor(cursor);
}
}
@override