Skip to content

Commit

Permalink
fix(view): use expected instance and fix corresponding interface for …
Browse files Browse the repository at this point in the history
…fakeclock

BREAKING CHANGE: issue: zztin#63
  • Loading branch information
tai271828 committed Jun 3, 2021
1 parent 4ba9340 commit 7ba7d62
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions ctimer/view.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ def show_clock_count(self, total_clock_counts: str) -> None:
"""
Abstract method of showing time_text and total_clock_counts with labels
:param time_text: the time text you want to show
:param total_clock_counts: the total clock counts you want to show
"""
raise NotImplementedError
Expand Down Expand Up @@ -363,9 +362,9 @@ def terminate(self):
if not self.tm.clock_details.is_break and not self.tm.fresh_new:
self.tm.clock_details.reached_bool, self.tm.clock_details.reason = self.ask_reached_goal_reason()
if self.tm.clock_details.reached_bool:
self.clock_details.clock_count += 1
self.tv.countdown_display("Done!", self.tm.clock_details.is_break)
self.tv.show_clock_count(self.tm.clock_details.clock_count)
self.tm.clock_details.clock_count += 1
self.countdown_display("Done!", self.tm.clock_details.is_break)
self.show_clock_count(self.tm.clock_details.clock_count)
# only if goal is reached, clock count is +1, we want to ask if it is a complete (no break) clock
self.tm.check_complete()
# Write to clock details even if it is terminated. (goal not reached)
Expand Down Expand Up @@ -428,7 +427,7 @@ def create_widgets(self):
self._show_gui_window_response("Widgets are created and arranged by the layout.")


def show_clock_count(self, time_text, total_clock_counts):
def show_clock_count(self, total_clock_counts):
self._show_gui_window_response(f"total_clock_counts: {total_clock_counts}")
self._label_total_clock_counts = total_clock_counts

Expand Down

0 comments on commit 7ba7d62

Please sign in to comment.