Skip to content

Commit

Permalink
ignore saved default empty logs...
Browse files Browse the repository at this point in the history
  • Loading branch information
bandinopla committed Aug 1, 2024
1 parent deb553f commit 7e9b516
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
3 changes: 3 additions & 0 deletions public/changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
- 2.30.2 : 2024-08-01
* Reported by @Duke309 : the recover autosave popups all the time unnecesarly when editing new days.

- 2.30.1 : 2024-07-30
* Requested by @Breezy : Add the posibility to filter by age in the SBD Rank.
* fixed the layout so in mobile the charts stack on top of each other... my bad.
Expand Down
5 changes: 5 additions & 0 deletions src/componentes/journal/editor-autosave.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@ export function useEditorAutosave( config:AutoSaveConfig ):AutoSaveReturn {
getAutosavedText: ()=> {
let text = localStorage.getItem( config.cacheKey ) || ""
//localStorage.removeItem( config.cacheKey );
let defaultPattern = /^\d{4}-\d{2}-\d{2}\n@ *\d+( *bw)?\s*$/i;
if( defaultPattern.test(text) )
{
return ""; //ignore...
}
return text;
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/version.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"buildMajor":"2","buildMinor":30,"buildRevision":1,"buildTag":"RELEASE","when":"Tue, 30 Jul 2024 15:23:50 GMT"}
{"buildMajor":"2","buildMinor":30,"buildRevision":2,"buildTag":"RELEASE","when":"Thu, 01 Aug 2024 20:05:13 GMT"}

0 comments on commit 7e9b516

Please sign in to comment.