Skip to content

Commit

Permalink
Add todos to overtime notification
Browse files Browse the repository at this point in the history
  • Loading branch information
temnov98 committed Apr 13, 2024
1 parent c3a7bfb commit 4fcc8a8
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// todo: не нравится тут зависимость от trackerPageModel
class OvertimeNotificationModel extends BaseModel {
constructor() {
super();
Expand Down Expand Up @@ -39,6 +40,9 @@ class OvertimeNotificationModel extends BaseModel {
return (trackerPageModel.getTotalTimeInSeconds() * 1000) > this.overtimeTresholdInMilliseconds;
}

// todo: плохо написал.
// оно будет висеть 5 минут, если нет активной задачи, а должно обновляться мгновенно.
// при исправлении важно учесть, чтобы не было циклических зависимостей
_getShouldNotify() {
if (!this.getIsOvertime()) {
return false;
Expand Down

0 comments on commit 4fcc8a8

Please sign in to comment.