Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.

Commit d9d7edd

Browse files
committed
Remove modified timestamp when adding notes
1 parent 2fab30a commit d9d7edd

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/include/tasks.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ class tasks {
130130
time: Math.ceil(time)
131131
});
132132

133-
frame.write();
133+
frame.write(true);
134134
resolve();
135135
})
136136
.catch(error => reject(error));

src/models/frame.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class frame extends BaseFrame {
3232
/**
3333
* write data to file
3434
*/
35-
write() {
35+
write(skipModified) {
3636
if (fs.existsSync(this.file)) fs.unlinkSync(this.file);
3737
fs.appendFileSync(this.file, JSON.stringify({
3838
id: this.id,
@@ -42,7 +42,7 @@ class frame extends BaseFrame {
4242
start: this._start,
4343
stop: this._stop,
4444
timezone: this.timezone,
45-
modified: moment()
45+
modified: skipModified ? this.modified : moment()
4646
}, null, "\t"));
4747
}
4848

0 commit comments

Comments
 (0)