feat(task-0006): implement menu restart button and signal coordination

- Update MenuUIViewModel with IMenuRestartSignal dependency and Restart() method
- Add RestartButton to MenuUIView with listener management in Initialize/Release
- Connect MenuUIView click handler to ViewModel.Restart() callback
- Fix race condition in MenuRestartSignal.RequestRestart() by nulling completion source first
- Wrap MenuState.WaitAsync() in try-catch for proper view cleanup on cancellation
- Update TASK-0006 status to Ready

Выполнена задача TASK-0006: реализована кнопка Restart и координация сигналов

- Обновлён MenuUIViewModel с зависимостью IMenuRestartSignal и методом Restart()
- Добавлена кнопка RestartButton в MenuUIView с управлением слушателями в Initialize/Release
- Подключен обработчик кликов MenuUIView к колбэку ViewModel.Restart()
- Исправлено состояние гонки в MenuRestartSignal.RequestRestart() путем обнуления completion source
- Обёрнут WaitAsync в MenuState в try-catch для корректной очистки view при отмене
- Обновлён статус TASK-0006 до Ready
This commit is contained in:
2026-05-27 04:35:05 +07:00
parent fda094dd44
commit 6601c8ea22
6 changed files with 109 additions and 3 deletions
@@ -17,7 +17,9 @@ namespace QuizPleaseTest.Boot.Flow
public void RequestRestart()
{
_restartCompletionSource?.TrySetResult();
UniTaskCompletionSource restartCompletionSource = _restartCompletionSource;
_restartCompletionSource = null;
restartCompletionSource?.TrySetResult();
}
}
}