Skip to content

Commit b18589a

Browse files
fix: ensure behavior defaults to minutes and correct random typo added
1 parent da182ba commit b18589a

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

safeeyes/core.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def initialize(self, config: Config):
7575
self._break_queue = BreakQueue.create(config, self.context)
7676
self.default_postpone_duration = int(config.get("postpone_duration"))
7777
self.postpone_unit = config.get("postpone_unit")
78-
if self.postpone_unit == "minutes":
78+
if self.postpone_unit != "seconds":
7979
self.default_postpone_duration *= 60
8080

8181
self.postpone_duration = self.default_postpone_duration
@@ -238,10 +238,10 @@ def __scheduler_job(self) -> None:
238238
)
239239

240240
# Wait for the pre break warning period
241-
if self.postpone_unit == "minutes":
242-
logging.info("Waiting for %d minutes until next break", (time_to_wait / 60))
243-
else:
241+
if self.postpone_unit == "seconds":
244242
logging.info("Waiting for %d seconds until next break", time_to_wait)
243+
else:
244+
logging.info("Waiting for %d minutes until next break", (time_to_wait / 60))
245245

246246
self.__wait_for(time_to_wait)
247247

safeeyes/ui/settings_dialog.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ def __initialize(self, config):
146146
self.infobar_long_break_shown = False
147147

148148
def __create_break_item(self, break_config, is_short):
149-
"""Create an entry for break be listed in the break tab."""
149+
"""Create an entry for break to be listed in the break tab."""
150150
parent_box = self.box_long_breaks
151151
if is_short:
152152
parent_box = self.box_short_breaks

0 commit comments

Comments
 (0)