refactor: standardize pagination response structure and enhance cursor handling
All checks were successful
Frontend CI / build-and-push-web (push) Successful in 5m8s
Frontend CI / ota-android (push) Successful in 11m22s
Frontend CI / build-android-apk (push) Successful in 45m46s

- Update various services and hooks to replace 'items' with 'list' for consistency in pagination responses.
- Modify PostRepository, commentService, groupService, messageService, and postService to align with the new response structure.
- Enhance cursor pagination logic in hooks and components to ensure proper handling of pagination states.
- Refactor HomeScreen, PostDetailScreen, SearchScreen, and other components to utilize the updated pagination structure.
This commit is contained in:
lafay
2026-03-23 03:58:26 +08:00
parent 88510aa6ae
commit 26ae288470
19 changed files with 312 additions and 309 deletions

View File

@@ -341,7 +341,7 @@ class GroupService {
} catch (error) {
console.error('获取群组列表失败:', error);
return {
items: [],
list: [],
next_cursor: null,
prev_cursor: null,
has_more: false,
@@ -368,7 +368,7 @@ class GroupService {
} catch (error) {
console.error('获取群组成员列表失败:', error);
return {
items: [],
list: [],
next_cursor: null,
prev_cursor: null,
has_more: false,
@@ -395,7 +395,7 @@ class GroupService {
} catch (error) {
console.error('获取群公告列表失败:', error);
return {
items: [],
list: [],
next_cursor: null,
prev_cursor: null,
has_more: false,