feat: session start screen, question context input, and G4F-style AI multi-provider fallback
This commit is contained in:
@@ -166,6 +166,18 @@ class WordsRepository {
|
||||
await _saveHistoryToPrefs();
|
||||
}
|
||||
|
||||
Future<void> updateHistoryEntry(String id, {String? aiInterpretation, String? question}) async {
|
||||
final idx = _history.indexWhere((e) => e.id == id);
|
||||
if (idx != -1) {
|
||||
final old = _history[idx];
|
||||
_history[idx] = old.copyWith(
|
||||
aiInterpretation: aiInterpretation ?? old.aiInterpretation,
|
||||
question: question ?? old.question,
|
||||
);
|
||||
await _saveHistoryToPrefs();
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> deleteHistoryEntry(String id) async {
|
||||
_history.removeWhere((e) => e.id == id);
|
||||
await _saveHistoryToPrefs();
|
||||
|
||||
Reference in New Issue
Block a user