mirror of
https://github.com/pepaskopec-blip/Graduately.git
synced 2026-10-28 15:44:34 +00:00
Show a what's-new card on the home screen after each update.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
dd8d992bf8
commit
6556c6691b
21 changed files with 490 additions and 0 deletions
|
|
@ -33,6 +33,7 @@ final class Content {
|
|||
let hw: [J]
|
||||
let mluvnice: [J]
|
||||
let books: [J]
|
||||
let changelog: [J]
|
||||
|
||||
init(_ root: [String: Any]) {
|
||||
raw = J(root)
|
||||
|
|
@ -63,6 +64,7 @@ final class Content {
|
|||
hw = raw.arr("hw")
|
||||
mluvnice = raw.arr("mluvnice")
|
||||
books = raw.arr("books")
|
||||
changelog = raw.arr("changelog")
|
||||
}
|
||||
|
||||
func germanUnit(_ id: Int) -> J? { german.first { $0.int("id") == id } }
|
||||
|
|
|
|||
|
|
@ -18,6 +18,11 @@ final class ProgressStore {
|
|||
set { defaults.set(newValue == .en ? "en" : "cs", forKey: "lang") }
|
||||
}
|
||||
|
||||
var seenCommit: String {
|
||||
get { defaults.string(forKey: "seen_commit") ?? "" }
|
||||
set { defaults.set(newValue, forKey: "seen_commit") }
|
||||
}
|
||||
|
||||
func germanDone(_ unit: Int, _ ex: Int) -> Bool { defaults.bool(forKey: "g.\(unit).\(ex)") }
|
||||
func markGerman(_ unit: Int, _ ex: Int) { defaults.set(true, forKey: "g.\(unit).\(ex)") }
|
||||
func vocabDone(_ unit: Int) -> Bool { defaults.bool(forKey: "g.\(unit).vocab") }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue