From e714b4684cf499570bd04f8caa0fe0a60956b26f Mon Sep 17 00:00:00 2001 From: quenousimporte Date: Fri, 29 Sep 2023 22:45:13 +0200 Subject: [PATCH] changed: serialize trash once data is saved --- main.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/main.js b/main.js index d4ef4ed..5989d14 100644 --- a/main.js +++ b/main.js @@ -2353,13 +2353,12 @@ function restoredeleted() if (index > -1) { var notetorestore = trash.splice(index, 1).pop(); - window.localStorage.setItem("trash", JSON.stringify(trash)); - notetorestore.title += " - restored on " + timestamp(); delete notetorestore.deletiondate; localdata.unshift(notetorestore); loadnote(notetorestore.title); datachanged(); + window.localStorage.setItem("trash", JSON.stringify(trash)); } } });