feat(pagination): add updateItem for in-place list updates and optimize notifications
Some checks failed
Frontend CI / build-and-push-web (push) Failing after 2m48s
Frontend CI / ota-android (push) Successful in 10m30s
Frontend CI / build-android-apk (push) Successful in 39m3s

Add `updateItem` function to cursor pagination hook for updating single items
without full list refresh. Use this in NotificationsScreen to mark messages
as read locally instead of refetching. Also add `is_blocked` detection in
postService and userProfile to show blocked state in profile screen.
This commit is contained in:
lafay
2026-04-25 11:26:13 +08:00
parent ad19bc2af7
commit f16f001f6c
6 changed files with 53 additions and 17 deletions

View File

@@ -240,6 +240,8 @@ export interface CursorPaginationActions<T> {
reset: () => void;
/** 设置数据(用于外部数据注入) */
setList: (list: T[], nextCursor: string | null, prevCursor: string | null, hasMore: boolean) => void;
/** 就地更新单条数据 */
updateItem: (id: string, updates: Partial<T>) => void;
}
/**