diff options
author | Vijay A <vraravam@users.noreply.github.com> | 2021-11-23 21:23:48 +0530 |
---|---|---|
committer | Vijay A <vraravam@users.noreply.github.com> | 2021-11-23 21:26:03 +0530 |
commit | b88f3a009471711299a5878fdadf6d197b505f27 (patch) | |
tree | f42779f5066dd6e23a718fc4f870cc5811c3f0ea | |
parent | docs: fix github issue template wording (diff) | |
download | ferdium-recipes-b88f3a009471711299a5878fdadf6d197b505f27.tar.gz ferdium-recipes-b88f3a009471711299a5878fdadf6d197b505f27.tar.zst ferdium-recipes-b88f3a009471711299a5878fdadf6d197b505f27.zip |
Fixing issue with 'toggl' recipe exposed by the pre-commit hook
-rw-r--r-- | all.json | 2 | ||||
-rw-r--r-- | recipes/toggl/package.json | 2 | ||||
-rw-r--r-- | recipes/toggl/webview-unsafe.js | 12 |
3 files changed, 6 insertions, 10 deletions
@@ -1683,7 +1683,7 @@ | |||
1683 | "featured": false, | 1683 | "featured": false, |
1684 | "id": "toggl", | 1684 | "id": "toggl", |
1685 | "name": "toggl", | 1685 | "name": "toggl", |
1686 | "version": "1.2.0", | 1686 | "version": "1.2.1", |
1687 | "icons": { | 1687 | "icons": { |
1688 | "svg": "https://cdn.jsdelivr.net/gh/getferdi/recipes/recipes/toggl/icon.svg" | 1688 | "svg": "https://cdn.jsdelivr.net/gh/getferdi/recipes/recipes/toggl/icon.svg" |
1689 | } | 1689 | } |
diff --git a/recipes/toggl/package.json b/recipes/toggl/package.json index 09e5b64..1188349 100644 --- a/recipes/toggl/package.json +++ b/recipes/toggl/package.json | |||
@@ -1,7 +1,7 @@ | |||
1 | { | 1 | { |
2 | "id": "toggl", | 2 | "id": "toggl", |
3 | "name": "toggl", | 3 | "name": "toggl", |
4 | "version": "1.2.0", | 4 | "version": "1.2.1", |
5 | "license": "MIT", | 5 | "license": "MIT", |
6 | "config": { | 6 | "config": { |
7 | "serviceURL": "https://www.toggl.com/app/timer", | 7 | "serviceURL": "https://www.toggl.com/app/timer", |
diff --git a/recipes/toggl/webview-unsafe.js b/recipes/toggl/webview-unsafe.js index 24b139f..1508dec 100644 --- a/recipes/toggl/webview-unsafe.js +++ b/recipes/toggl/webview-unsafe.js | |||
@@ -1,11 +1,7 @@ | |||
1 | // only try to update badge once Ferdi API has finished loading | 1 | // only try to update badge once Ferdi API has finished loading |
2 | if (ferdi != undefined && ferdi.setBadge != undefined) { | 2 | if (window.ferdi != undefined && window.ferdi.setBadge != undefined) { |
3 | var timerRunning = (window.toggl != undefined) && !!(window.toggl.store.getState().view.timer.timeEntry.start); | 3 | var timerRunning = (window.toggl != undefined) && !!(window.toggl.store.getState().view.timer.timeEntry.start); |
4 | 4 | ||
5 | if (timerRunning) { | 5 | // Treat running timer as a "non-direct" notification (default blue dot instead of urgent red "1") |
6 | // Treat running timer as a "non-direct" notification (default blue dot instead of urgent red "1") | 6 | window.ferdi.setBadge(0, timerRunning ? 1 : 0); |
7 | ferdi.setBadge(0, 1); | ||
8 | } else { | ||
9 | ferdi.setBadge(0); | ||
10 | } | ||
11 | } | 7 | } |