Skip to content

Commit e4dc7f1

Browse files
committed
More fixes
1 parent dc942c0 commit e4dc7f1

5 files changed

Lines changed: 6 additions & 12 deletions

File tree

app/break-renderer.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ window.onload = async (event) => {
4242
}
4343
if (Date.now() - started < duration) {
4444
const passedPercent = (Date.now() - started) / duration * 100
45-
await window.breaks.canSkip(strictMode, postpone, passedPercent, postponePercent)
4645
postponeElement.style.display =
4746
await window.breaks.canPostpone(postpone, passedPercent, postponePercent) ? 'flex' : 'none'
4847
closeElement.style.display =

app/main.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1405,10 +1405,10 @@ function updateToolTip () {
14051405
}
14061406

14071407
function showNotification (text) {
1408-
processWin.webContents.send('show-notification', {
1408+
processWin.webContents.send('show-notification',
14091409
text,
1410-
silent: settings.get('silentNotifications')
1411-
})
1410+
settings.get('silentNotifications')
1411+
)
14121412
}
14131413

14141414
ipcMain.on('postpone-microbreak', function (event, shouldPlaySound) {

app/microbreak-renderer.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ window.onload = async (event) => {
4141
}
4242
if (Date.now() - started < duration) {
4343
const passedPercent = (Date.now() - started) / duration * 100
44-
await window.breaks.canSkip(strictMode, postpone, passedPercent, postponePercent)
4544
postponeElement.style.display =
4645
await window.breaks.canPostpone(postpone, passedPercent, postponePercent) ? 'flex' : 'none'
4746
closeElement.style.display =

app/process-preload.mjs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { contextBridge, ipcRenderer, shell } from 'electron'
22
import semver from 'semver'
3-
import humanizeDuration from 'humanize-duration'
43
import * as utils from './utils/utils.js'
54

65
contextBridge.exposeInMainWorld('electronAPI', {
@@ -14,10 +13,6 @@ contextBridge.exposeInMainWorld('electronAPI', {
1413
openExternal: (path) => shell.openExternal(path)
1514
})
1615

17-
contextBridge.exposeInMainWorld('humanize', {
18-
humanizeDuration: (ms, { opts }) => { humanizeDuration(ms, opts) }
19-
})
20-
2116
contextBridge.exposeInMainWorld('semver', {
2217
valid: (version) => semver.valid(version),
2318
clean: (version) => semver.clean(version),

app/process-renderer.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
import VersionChecker from './utils/versionChecker.js'
22

3-
window.onload = (e) => {
3+
window.onload = async (e) => {
44
window.electronAPI.onPlaySound((file, volume) => {
55
__electronLog.info(`Stretchly: playing audio/${file}.wav (volume: ${volume})`)
66
const audio = new Audio(`audio/${file}.wav`)
77
audio.volume = volume
88
audio.play()
99
})
1010

11-
window.electronAPI.onShowNotification(async (file, text, silent) => {
11+
window.electronAPI.onShowNotification(async (text, silent) => {
12+
__electronLog.info(`Stretchly: showing notification "${text}" (silent: ${silent})`)
1213
const title = await window.utils.shouldShowNotificationTitle(
1314
await window.process.platform,
1415
await window.process.getSystemVersion()

0 commit comments

Comments
 (0)