mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 00:55:28 +00:00
complete bookmark toggle features
This commit is contained in:
parent
232f67b9cc
commit
c511b97d2d
4 changed files with 34 additions and 2 deletions
|
|
@ -49,7 +49,10 @@ impl Bookmark {
|
|||
let time = DateTime::now_local().unwrap();
|
||||
|
||||
if self.has_request(request, false) {
|
||||
// @TODO
|
||||
match self.database.delete(request) {
|
||||
Ok(_) => self.memory.delete(request),
|
||||
Err(_) => todo!(),
|
||||
}
|
||||
} else {
|
||||
match self.database.add(time.clone(), request.into()) {
|
||||
Ok(_) => self.memory.set(request.into(), time),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue