flagging and exclude
This commit is contained in:
@@ -27,11 +27,14 @@ class AttemptService {
|
||||
final size = attemptSize ?? deck.config.defaultAttemptSize;
|
||||
|
||||
// Filter candidates based on includeKnownInAttempts setting
|
||||
// Use override parameter if provided, otherwise use config
|
||||
final shouldIncludeKnown = includeKnown ?? deck.config.includeKnownInAttempts;
|
||||
final candidates = shouldIncludeKnown
|
||||
? deck.questions
|
||||
var candidates = shouldIncludeKnown
|
||||
? List<Question>.from(deck.questions)
|
||||
: deck.questions.where((q) => !q.isKnown).toList();
|
||||
// Exclude flagged questions when config says so
|
||||
if (deck.config.excludeFlaggedQuestions) {
|
||||
candidates = candidates.where((q) => !q.isFlagged).toList();
|
||||
}
|
||||
|
||||
final selected = _selector.selectQuestions(
|
||||
candidates: candidates,
|
||||
|
||||
Reference in New Issue
Block a user