mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 09:05:27 +00:00
add existing profile activate feature
This commit is contained in:
parent
aa076b370b
commit
84926a4e8c
2 changed files with 36 additions and 9 deletions
|
|
@ -25,15 +25,16 @@ impl Welcome {
|
|||
move |value| {
|
||||
match value {
|
||||
Some(id) => {
|
||||
// Select profile by record ID @TODO
|
||||
// Activate selected profile by record ID
|
||||
let _ = profile.database.activate(id);
|
||||
}
|
||||
None => {
|
||||
// Create and select new profile
|
||||
let _ = profile
|
||||
.database
|
||||
.add(true, &DateTime::now_local().unwrap(), None);
|
||||
.add(true, DateTime::now_local().unwrap(), None);
|
||||
}
|
||||
}
|
||||
} // @TODO handle result
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue