mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 17:15:28 +00:00
implement permanent storage for profile history
This commit is contained in:
parent
7803aa1c44
commit
a6107bf1bb
8 changed files with 310 additions and 73 deletions
|
|
@ -79,7 +79,7 @@ impl Profile {
|
|||
|
||||
// Init components
|
||||
let bookmark = Rc::new(Bookmark::build(&connection, &profile_id)?);
|
||||
let history = Rc::new(History::build(&connection, &profile_id));
|
||||
let history = Rc::new(History::build(&connection, &profile_id)?);
|
||||
let search = Rc::new(Search::build(&connection, &profile_id)?);
|
||||
let identity = Rc::new(Identity::build(&connection, &profile_id)?);
|
||||
|
||||
|
|
@ -93,6 +93,12 @@ impl Profile {
|
|||
config_path,
|
||||
})
|
||||
}
|
||||
|
||||
// Actions
|
||||
|
||||
pub fn save(&self) -> Result<()> {
|
||||
self.history.save()
|
||||
}
|
||||
}
|
||||
|
||||
pub fn migrate(tx: &Transaction) -> Result<()> {
|
||||
|
|
@ -103,8 +109,7 @@ pub fn migrate(tx: &Transaction) -> Result<()> {
|
|||
bookmark::migrate(tx)?;
|
||||
identity::migrate(tx)?;
|
||||
search::migrate(tx)?;
|
||||
// @TODO not in use yet
|
||||
// history::migrate(tx)?;
|
||||
history::migrate(tx)?;
|
||||
|
||||
// Success
|
||||
Ok(())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue