Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/main/lib/cir.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ const SUCCESS_RATE_PENALTY = 0.8
const INTERVIEW_MODE_MULTIPLIER = 0.5
const EASY_BONUS_MULTIPLIER = 1.15
const MIN_EASE_FACTOR = 1.3
const MAX_INTERVAL_DAYS = 365

// Initial ease factor for new cards
export const INITIAL_EASE_FACTOR = 2.5
Expand Down Expand Up @@ -135,8 +136,7 @@ export function calculateNextReview(
newInterval = Math.max(1, Math.round(newInterval * INTERVIEW_MODE_MULTIPLIER))
}

// Ensure minimum interval of 1 day
newInterval = Math.max(1, newInterval)
newInterval = Math.max(1, Math.min(MAX_INTERVAL_DAYS, newInterval))

return {
newState: {
Expand Down
Loading