Skip to content

Commit 1174410

Browse files
committed
core: start/enable_safeeyes: remove unused reset_breaks param
1 parent f61257d commit 1174410

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

safeeyes/core.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,16 +95,13 @@ def initialize(self, config: Config):
9595

9696
self.postpone_duration = self.default_postpone_duration
9797

98-
def start(self, next_break_time=-1, reset_breaks=False) -> None:
98+
def start(self, next_break_time=-1) -> None:
9999
"""Start Safe Eyes is it is not running already."""
100100
if self._break_queue is None:
101101
logging.info("No breaks defined, not starting the core")
102102
return
103103
if not self.running:
104104
logging.info("Start Safe Eyes core")
105-
if reset_breaks:
106-
logging.info("Reset breaks to start from the beginning")
107-
self._break_queue.reset()
108105

109106
self.running = True
110107
self.scheduled_next_break_timestamp = int(next_break_time)

safeeyes/safeeyes.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -237,8 +237,8 @@ def do_startup(self):
237237
self.show_about
238238
)
239239
self.context["api"]["enable_safeeyes"] = (
240-
lambda next_break_time=-1, reset_breaks=False: utility.execute_main_thread(
241-
self.enable_safeeyes, next_break_time, reset_breaks
240+
lambda next_break_time=-1: utility.execute_main_thread(
241+
self.enable_safeeyes, next_break_time
242242
)
243243
)
244244
self.context["api"]["disable_safeeyes"] = (
@@ -494,15 +494,15 @@ def restart(self, config, set_active=False):
494494
self.safe_eyes_core.start()
495495
self.plugins_manager.start()
496496

497-
def enable_safeeyes(self, scheduled_next_break_time=-1, reset_breaks=False):
497+
def enable_safeeyes(self, scheduled_next_break_time=-1):
498498
"""Listen to tray icon enable action and send the signal to core."""
499499
if (
500500
not self.required_plugin_dialog_active
501501
and not self.active
502502
and self.safe_eyes_core.has_breaks()
503503
):
504504
self.active = True
505-
self.safe_eyes_core.start(scheduled_next_break_time, reset_breaks)
505+
self.safe_eyes_core.start(scheduled_next_break_time)
506506
self.plugins_manager.start()
507507

508508
def disable_safeeyes(self, status=None, is_resting=False):

0 commit comments

Comments
 (0)