mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 08:46:37 -04:00
decks start collapsed
This commit is contained in:
parent
4b7d30f515
commit
7d8448a321
3 changed files with 14 additions and 2 deletions
|
@ -45,7 +45,11 @@ impl Deck {
|
|||
name: "".into(),
|
||||
mtime_secs: TimestampSecs(0),
|
||||
usn: Usn(0),
|
||||
common: DeckCommon::default(),
|
||||
common: DeckCommon {
|
||||
study_collapsed: true,
|
||||
browser_collapsed: true,
|
||||
..Default::default()
|
||||
},
|
||||
kind: DeckKind::Normal(norm),
|
||||
}
|
||||
}
|
||||
|
|
|
@ -133,7 +133,11 @@ impl Deck {
|
|||
name: "".into(),
|
||||
mtime_secs: TimestampSecs(0),
|
||||
usn: Usn(0),
|
||||
common: DeckCommon::default(),
|
||||
common: DeckCommon {
|
||||
study_collapsed: true,
|
||||
browser_collapsed: true,
|
||||
..Default::default()
|
||||
},
|
||||
kind: DeckKind::Filtered(filt),
|
||||
}
|
||||
}
|
||||
|
|
|
@ -35,6 +35,10 @@ impl SqliteStorage {
|
|||
self.upgrade_tags_to_schema17()?;
|
||||
self.db.execute_batch("update col set ver = 17")?;
|
||||
}
|
||||
// fixme: on the next schema upgrade, change _collapsed to _expanded
|
||||
// in DeckCommon and invert existing values, so that we can avoid
|
||||
// serializing the values in the default case, and use
|
||||
// DeckCommon::default() in new_normal() and new_filtered()
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue