This commit is contained in:
yggverse 2024-10-05 04:54:08 +03:00
parent f463c71d4f
commit aad0e266f6
6 changed files with 30 additions and 30 deletions

View file

@ -227,17 +227,17 @@ impl Browser {
}
// Actions
pub fn clean(&self, app_id: i64) {
pub fn clean(&self, app_id: &i64) {
match self.database.records(app_id) {
Ok(records) => {
for record in records {
match self.database.delete(record.id) {
match self.database.delete(&record.id) {
Ok(_) => {
// Delegate clean action to childs
// @TODO
// self.header.clean(record.id);
// self.main.clean(record.id);
self.widget.clean(record.id);
self.widget.clean(&record.id);
}
Err(error) => panic!("{error}"), // @TODO
}
@ -247,11 +247,11 @@ impl Browser {
}
}
pub fn restore(&self, app_id: i64) {
pub fn restore(&self, app_id: &i64) {
// @TODO
}
pub fn save(&self, app_id: i64) {
pub fn save(&self, app_id: &i64) {
match self.database.add(app_id) {
Ok(_) => {
// Delegate save action to childs
@ -259,7 +259,7 @@ impl Browser {
// @TODO
// self.header.save(id);
// self.main.save(id);
self.widget.save(id);
self.widget.save(&id);
}
Err(error) => panic!("{error}"), // @TODO
}