feat(private-room): migrate to album APIs

This commit is contained in:
2026-07-14 12:30:22 +08:00
parent 9612a28b3c
commit 538af6d45f
48 changed files with 1529 additions and 2092 deletions
@@ -12,19 +12,15 @@ import type {
export interface PrivateRoomContextState {
status: string;
profile: MachineContext["profile"];
items: MachineContext["items"];
nextCursor: string | null;
hasMore: boolean;
creditBalance: number;
errorMessage: string | null;
unlockingMomentId: string | null;
unlockingAlbumId: string | null;
unlockErrorMessage: string | null;
pendingConfirmMomentId: string | null;
pendingConfirmAlbumId: string | null;
unlockPaywallRequest: MachineContext["unlockPaywallRequest"];
unlockSuccessNonce: number;
isLoading: boolean;
isLoadingMore: boolean;
isUnlocking: boolean;
}
@@ -63,19 +59,15 @@ function selectPrivateRoomState(
): PrivateRoomContextState {
return {
status: String(state.value),
profile: state.context.profile,
items: state.context.items,
nextCursor: state.context.nextCursor,
hasMore: state.context.hasMore,
creditBalance: state.context.creditBalance,
errorMessage: state.context.errorMessage,
unlockingMomentId: state.context.unlockingMomentId,
unlockingAlbumId: state.context.unlockingAlbumId,
unlockErrorMessage: state.context.unlockErrorMessage,
pendingConfirmMomentId: state.context.pendingConfirmMomentId,
pendingConfirmAlbumId: state.context.pendingConfirmAlbumId,
unlockPaywallRequest: state.context.unlockPaywallRequest,
unlockSuccessNonce: state.context.unlockSuccessNonce,
isLoading: state.matches("loading"),
isLoadingMore: state.matches("loadingMore"),
isUnlocking: state.matches("unlocking"),
};
}