Skip to content

Commit

Permalink
Fix item checked
Browse files Browse the repository at this point in the history
  • Loading branch information
Nixellion committed Jan 16, 2023
1 parent 537ee99 commit 7d23cf9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def remember_task(task):


def todoist_item_to_txt(item):
if item['checked'] == 0:
if item['checked'] is False:
text = ""
else:
text = "x "
Expand Down Expand Up @@ -158,11 +158,11 @@ def get_project_items(project_name):
break
item_text = todoist_item_to_txt(item)

if item['checked'] == 0 or config['show_completed_tasks']:
if item['checked'] is False or config['show_completed_tasks']:
items.append(item_text)

# Cleanup completed tasks
if config['remove_completed_tasks'] and item['checked'] == 1:
if config['remove_completed_tasks'] and item['checked'] is True:
remember_task(item['content'])
if config['clean_up_completed_tasks']:
print(f"Deleting task '{item['content']}'")
Expand Down

0 comments on commit 7d23cf9

Please sign in to comment.