refactor: 收口公开详情封面解锁规则

This commit is contained in:
2026-06-04 00:21:57 +08:00
parent 39522f3b96
commit 8c54d40b9c
5 changed files with 71 additions and 17 deletions

View File

@@ -532,6 +532,7 @@ import {
resolvePlatformPublicWorkActionMode,
resolvePlatformPublicWorkDetailOpenDecision,
resolvePlatformPublicWorkDetailOpenStrategy,
resolveVisiblePuzzleDetailCoverCount,
} from './platformPublicWorkDetailFlow';
import {
buildPuzzleResultProfileId,
@@ -731,22 +732,6 @@ function isRecommendRuntimeReadyForEntry(
return true;
}
function resolveVisiblePuzzleDetailCoverCount(
entry: PlatformPublicGalleryCard | null,
run: PuzzleRunSnapshot | null,
) {
if (!entry || !isPuzzleGalleryEntry(entry)) {
return 1;
}
if (run?.entryProfileId !== entry.profileId) {
return 1;
}
// 中文注释:封面首图永远公开,后续封面跟随当前玩家本次 run 的通关进度即时解锁。
return Math.max(1, run.clearedLevelCount + 1);
}
function mapBarkBattleWorkToPublishedConfig(
work: BarkBattleWorkSummary,
): BarkBattlePublishedConfig {