HACKER097 / wisdom-tree

Wisdom Tree is a TUI concentration app, with features like pomodoro timer, YouTube music player, Lo-fi radio.
MIT License
353 stars 22 forks source link

End timer now selection is calling breakover #3

Closed JB-pythonic-py closed 3 years ago

JB-pythonic-py commented 3 years ago
def breakdisplay(self, maxx, maxy):
        self.secondsleft = int(self.breakendtime)-int(time.time())
        timertext = "Break ends in: " + str(int(self.secondsleft/60)).zfill(2) + ":" + str(self.secondsleft%60).zfill(2)
        self.stdscr.addstr(int(maxy*10/11), int(maxx/2-len(timertext)/2), timertext)

        if self.secondsleft == 0:
            mixer.music.unpause()
            self.isbrake = False
            self.breakover = True
            self.alarm.play()

`

Selecting "End timer now" is calling breakover, but ending the timer during pomodoro clock could call a new method.

self.pomodoroover

Then this can display a message about the pomodoro being over instead of the break.

HACKER097 commented 3 years ago

Has been fixed.