feat: unified 1..9 words session narrative, dice input before reveal, dedicated results screen, and clean session history grouping
This commit is contained in:
@@ -87,19 +87,19 @@ class _WordCardWidgetState extends State<WordCardWidget> {
|
||||
Future<void> _recordToHistory() async {
|
||||
if (_savedToHistory) return;
|
||||
final newId = DateTime.now().millisecondsSinceEpoch.toString();
|
||||
final entry = HistoryEntry(
|
||||
final sessionWord = SessionWord.fromWordItem(
|
||||
widget.word,
|
||||
positionTitle: widget.positionTitle,
|
||||
);
|
||||
final session = OracleSession(
|
||||
id: newId,
|
||||
timestamp: DateTime.now(),
|
||||
word: widget.word.word,
|
||||
sessionNumber: widget.word.sessionNumber,
|
||||
partOfSpeech: widget.word.partOfSpeech,
|
||||
symbolicMeaning: widget.word.description,
|
||||
readingType: widget.positionTitle ?? 'Жребий номера',
|
||||
positionTitle: widget.positionTitle,
|
||||
wordsCount: 1,
|
||||
words: [sessionWord],
|
||||
question: widget.question,
|
||||
aiInterpretation: _aiInterpretation,
|
||||
);
|
||||
await _repo.addHistoryEntry(entry);
|
||||
await _repo.saveSession(session);
|
||||
if (!mounted) return;
|
||||
setState(() {
|
||||
_savedToHistory = true;
|
||||
|
||||
Reference in New Issue
Block a user