fix(ads): reset ad round in startStage so nextStage advance counts (review fix)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-13 14:09:02 +09:00
parent 297449ccce
commit 1ec59ba80d
2 changed files with 1 additions and 2 deletions
+1 -1
View File
@@ -68,6 +68,7 @@ class GameSessionNotifier extends Notifier<GameViewState?> {
_engine = GameEngine(stage, attempt: attempt, generator: generator);
_fxTick = 0;
_publish(lastPlacement: null);
ref.read(adServiceProvider).onRoundStart();
}
/// Restarts the current stage as a new attempt (fresh piece sequence).
@@ -75,7 +76,6 @@ class GameSessionNotifier extends Notifier<GameViewState?> {
final stage = _stage;
if (stage == null) throw StateError('no stage to restart');
startStage(stage, attempt: _attempt + 1, generator: _generatorOverride);
ref.read(adServiceProvider).onRoundStart();
if (stage.endless) {
ref.read(analyticsProvider).endlessStart();
} else {
-1
View File
@@ -117,7 +117,6 @@ class _GameScreenState extends ConsumerState<GameScreen>
void _onSessionChange(GameViewState? prev, GameViewState? next) {
if (next == null) return;
if (prev == null) ref.read(adServiceProvider).onRoundStart();
final audio = ref.read(audioServiceProvider);
if (prev?.fxTick != next.fxTick && next.lastPlacement != null) {
final placement = next.lastPlacement!;