Skip to content

Commit

Permalink
✔️ Fixed timer not clearing from action
Browse files Browse the repository at this point in the history
- Wider font dropdown
- Version update
  • Loading branch information
vassbo committed Dec 5, 2024
1 parent 5fe36db commit c23b141
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 8 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "freeshow",
"version": "1.3.2",
"version": "1.3.3-beta.1",
"private": true,
"main": "build/electron/index.js",
"description": "Show song lyrics and more for free!",
Expand Down
9 changes: 7 additions & 2 deletions src/frontend/components/helpers/timerTick.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export function startTimer() {
if (get(currentWindow)) return
if (!get(activeTimers).filter((a) => a.paused !== true).length || timeout) return

if (timeout) clearTimeout(timeout)
timeout = setTimeout(() => {
let newActiveTimers = clone(get(activeTimers)).map(increment)

Expand Down Expand Up @@ -51,8 +52,12 @@ export function startTimerById(id: string) {
}

export function stopTimers() {
activeTimers.set([])
customInterval = INTERVAL
// timeout so timer_end action don't clear at the same time as next timer tick starts
setTimeout(() => {
// if (timeout) clearTimeout(timeout) // clear timeout (timer does not start again then...)
activeTimers.set([])
customInterval = INTERVAL
}, 50)
}

function increment(timer: any, i: number) {
Expand Down
12 changes: 7 additions & 5 deletions src/frontend/components/inputs/FontDropdown.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -185,11 +185,6 @@
display: flex;
}
.dropdownElem :global(.arrow) {
width: 130px !important;
text-transform: capitalize;
}
div {
background-color: var(--primary-darker);
color: var(--text);
Expand All @@ -207,6 +202,13 @@
border: 2px solid var(--primary-lighter);
transform: translateY(-1px);
z-index: 10;
width: 180%;
right: 0;
}
.dropdownElem :global(.dropdownElem .dropdown.arrow) {
/* this is currently relative to 40px anyway */
width: 520% !important;
}
button {
Expand Down

0 comments on commit c23b141

Please sign in to comment.