blob: 3e39e3e79fa28bb1c8b4c1ef335b999b086280e8 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
|
// only try to update badge once Ferdium API has finished loading
if (window.ferdium !== undefined && window.ferdium.setBadge !== undefined) {
const timerRunning =
window.toggl !== undefined &&
!!window.toggl.store.getState().view.timer.timeEntry.start;
// Treat running timer as a "non-direct" notification (default blue dot instead of urgent red "1")
window.ferdium.setBadge(0, timerRunning ? 1 : 0);
}
|