Bump courseDataVersion to 4 for sentence gap-fill re-seed
Existing installs will delete and re-seed all VocabCard/CourseDeck data on next launch, picking up the ~6,300 new example sentences and blank fields added for the Complete the Sentence quiz type. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -123,7 +123,7 @@ actor DataLoader {
|
|||||||
/// Re-seed course data if the version has changed (e.g. examples were added).
|
/// Re-seed course data if the version has changed (e.g. examples were added).
|
||||||
/// Call this on every launch — it checks a version key and only re-seeds when needed.
|
/// Call this on every launch — it checks a version key and only re-seeds when needed.
|
||||||
static func refreshCourseDataIfNeeded(container: ModelContainer) async {
|
static func refreshCourseDataIfNeeded(container: ModelContainer) async {
|
||||||
let currentVersion = 3 // Bump this whenever course_data.json changes
|
let currentVersion = 4 // Bump this whenever course_data.json changes
|
||||||
let key = "courseDataVersion"
|
let key = "courseDataVersion"
|
||||||
let shared = UserDefaults.standard
|
let shared = UserDefaults.standard
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user