Skip to content

Commit

Permalink
Merge pull request #6 from hovancik/fix/long
Browse files Browse the repository at this point in the history
Fixes Long Break never happening
  • Loading branch information
hovancik authored Sep 1, 2022
2 parents 3e89524 + c3dce86 commit db20b68
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Fixed
- Long Break never happening (because of bad parsing of preferences)

## [0.0.4] - 2022-08-31
### Changed
- allow to edit preferences only when breaks are stopped
Expand Down
8 changes: 4 additions & 4 deletions src/stores/preferences.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { writable } from 'svelte/store'

export const longBreakInterval = writable(window.localStorage.getItem('longBreakInterval') || 2)
export const longBreakDuration = writable(window.localStorage.getItem('longBreakDuration') || 60 * 5)
export const miniBreakInterval = writable(window.localStorage.getItem('miniBreakInterval') || 60 * 10)
export const miniBreakDuration = writable(window.localStorage.getItem('miniBreakDuration') || 60 * 0.5)
export const longBreakInterval = writable(parseInt(window.localStorage.getItem('longBreakInterval')) || 2)
export const longBreakDuration = writable(parseInt(window.localStorage.getItem('longBreakDuration')) || 60 * 5)
export const miniBreakInterval = writable(parseInt(window.localStorage.getItem('miniBreakInterval')) || 60 * 10)
export const miniBreakDuration = writable(parseInt(window.localStorage.getItem('miniBreakDuration')) || 60 * 0.5)

1 comment on commit db20b68

@vercel
Copy link

@vercel vercel bot commented on db20b68 Sep 1, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.