mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-23 23:19:40 +01:00
fix: fix and add tests for trash
This commit is contained in:
@@ -374,9 +374,14 @@ class Database {
|
||||
}
|
||||
|
||||
getTrash() {
|
||||
checkInitialized();
|
||||
checkInitialized.call(this);
|
||||
return extractValues(this.trash).reverse();
|
||||
}
|
||||
|
||||
async clearTrash() {
|
||||
this[KEYS.trash] = {};
|
||||
await this.storage.write(KEYS.trash, this[KEYS.trash]);
|
||||
}
|
||||
}
|
||||
|
||||
export default Database;
|
||||
|
||||
Reference in New Issue
Block a user