Skip to content

Commit

Permalink
Fixed stored notifications always showing at startup
Browse files Browse the repository at this point in the history
  • Loading branch information
joaomgcd committed Aug 7, 2020
1 parent 3da82eb commit 01f9499
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,5 @@ dist/win-unpacked
.DS_Store
dist/squirrel-windows/com.joaomgcd.join-**full.nupkg
dist/squirrel-windows/RELEASES
**.nupkg
**.nupkg
*.bak
7 changes: 5 additions & 2 deletions server/servernotification.js
Original file line number Diff line number Diff line change
Expand Up @@ -236,8 +236,11 @@ class WindowNotification{
const crypto = require("crypto");
this.options.id = crypto.randomBytes(16).toString("hex");
}
this.timeCreated = new Date().getTime();
this.timeoutTime = this.timeCreated + this.options.timeout;
this.timeCreated = options.timeCreated || new Date().getTime();
this.timeoutTime = options.timeoutTime || (this.timeCreated + this.options.timeout);

this.options.timeCreated = this.timeCreated;
this.options.timeoutTime = this.timeoutTime;
}
set hidden(value){
this.options.hidden = value;
Expand Down

0 comments on commit 01f9499

Please sign in to comment.