diff --git a/pomodoroprompt.py b/pomodoroprompt.py index 6ada2e1..e4e957b 100644 --- a/pomodoroprompt.py +++ b/pomodoroprompt.py @@ -11,11 +11,17 @@ LONG_MIN = 15 def pomodoro_prompt_plan(whatdid = ''): - whatnext = zenipy.zenipy.entry(text="What're you gonna do?", placeholder='Same thing i did last time', title='Pomodoro Prompt: Plan') + whatnext = zenipy.zenipy.entry(text="What're you gonna do?", placeholder=whatdid, title='Pomodoro Prompt: Plan') + # Pressing cancel returns None, but we want to just treat it as an empty string. + if whatnext is None: + whatnext = '' return whatnext def pomodoro_prompt_report(whatnext): - whatdid = zenipy.zenipy.entry(text="What'd you do?", placeholder='What i said i would do', title='Pomodoro Prompt: Report') + whatdid = zenipy.zenipy.entry(text="What'd you do?", placeholder=whatnext, title='Pomodoro Prompt: Report') + # Pressing cancel returns None, but we want to just treat it as an empty string. + if whatdid is None: + whatdid = '' return whatdid def record_task(whatdid, start, end=None):