修复小游戏生成页恢复生成态
按生成状态判定小游戏生成页是否仍在生成中 补充敲木鱼生成中草稿恢复回归测试 记录小游戏生成页恢复 busy 判定踩坑
This commit is contained in:
@@ -696,6 +696,13 @@ export function resolveMiniGameGenerationProgressTickState(
|
||||
return kind ? (states[kind] ?? null) : null;
|
||||
}
|
||||
|
||||
export function resolveMiniGameGenerationViewBusy(
|
||||
isBusy: boolean,
|
||||
state: MiniGameDraftGenerationState | null | undefined,
|
||||
) {
|
||||
return isBusy || isMiniGameDraftGenerating(state ?? null);
|
||||
}
|
||||
|
||||
type PuzzleDetailReturnTarget = {
|
||||
tab: PlatformHomeTab;
|
||||
};
|
||||
@@ -4454,11 +4461,10 @@ export function PlatformEntryFlowShellImpl({
|
||||
activeMatch3DBackgroundCompileTask?.payload ?? match3dFormDraftPayload;
|
||||
const match3dGenerationViewError =
|
||||
activeMatch3DBackgroundCompileTask?.error ?? match3dError;
|
||||
const isMatch3DGenerationViewBusy =
|
||||
isMatch3DBusy ||
|
||||
isMiniGameDraftGenerating(
|
||||
activeMatch3DBackgroundCompileTask?.generationState ?? null,
|
||||
);
|
||||
const isMatch3DGenerationViewBusy = resolveMiniGameGenerationViewBusy(
|
||||
isMatch3DBusy,
|
||||
match3dGenerationViewState,
|
||||
);
|
||||
const activePuzzleGenerationSessionId =
|
||||
selectionStage === 'puzzle-generating'
|
||||
? (activePuzzleGenerationSessionIdRef.current ??
|
||||
@@ -4488,11 +4494,22 @@ export function PlatformEntryFlowShellImpl({
|
||||
}, [puzzleFlow.setSession]);
|
||||
const puzzleGenerationViewError =
|
||||
activePuzzleBackgroundCompileTask?.error ?? puzzleError;
|
||||
const isPuzzleGenerationViewBusy =
|
||||
isPuzzleBusy ||
|
||||
isMiniGameDraftGenerating(
|
||||
activePuzzleBackgroundCompileTask?.generationState ?? null,
|
||||
);
|
||||
const isPuzzleGenerationViewBusy = resolveMiniGameGenerationViewBusy(
|
||||
isPuzzleBusy,
|
||||
puzzleGenerationViewState,
|
||||
);
|
||||
const isJumpHopGenerationViewBusy = resolveMiniGameGenerationViewBusy(
|
||||
isJumpHopBusy,
|
||||
jumpHopGenerationState,
|
||||
);
|
||||
const isPuzzleClearGenerationViewBusy = resolveMiniGameGenerationViewBusy(
|
||||
isPuzzleClearBusy,
|
||||
puzzleClearGenerationState,
|
||||
);
|
||||
const isWoodenFishGenerationViewBusy = resolveMiniGameGenerationViewBusy(
|
||||
isWoodenFishBusy,
|
||||
woodenFishGenerationState,
|
||||
);
|
||||
const platformBootstrapErrorForDisplay = isCreationEntryDisabledErrorMessage(
|
||||
platformBootstrap.platformError,
|
||||
)
|
||||
@@ -15592,7 +15609,7 @@ export function PlatformEntryFlowShellImpl({
|
||||
jumpHopGenerationState,
|
||||
miniGameGenerationProgressNowMs,
|
||||
)}
|
||||
isGenerating={isJumpHopBusy}
|
||||
isGenerating={isJumpHopGenerationViewBusy}
|
||||
error={jumpHopError}
|
||||
onBack={leaveJumpHopFlow}
|
||||
onEditSetting={() => {
|
||||
@@ -15728,7 +15745,7 @@ export function PlatformEntryFlowShellImpl({
|
||||
puzzleClearGenerationState,
|
||||
miniGameGenerationProgressNowMs,
|
||||
)}
|
||||
isGenerating={isPuzzleClearBusy}
|
||||
isGenerating={isPuzzleClearGenerationViewBusy}
|
||||
error={puzzleClearError}
|
||||
onBack={leavePuzzleClearFlow}
|
||||
onEditSetting={() => {
|
||||
@@ -15867,7 +15884,7 @@ export function PlatformEntryFlowShellImpl({
|
||||
woodenFishGenerationState,
|
||||
miniGameGenerationProgressNowMs,
|
||||
)}
|
||||
isGenerating={isWoodenFishBusy}
|
||||
isGenerating={isWoodenFishGenerationViewBusy}
|
||||
error={woodenFishError}
|
||||
onBack={leaveWoodenFishFlow}
|
||||
onEditSetting={() => {
|
||||
|
||||
Reference in New Issue
Block a user