fix problem where todos were only shown of a single group

This commit is contained in:
aceisace 2022-10-04 23:56:43 +02:00
parent 4753dbc4a6
commit 69786fb4df

View File

@ -164,7 +164,7 @@ class Todoist(inkycal_module):
for name, todos in groups.items():
if todos:
for todo in todos:
if cursor < len(line_positions):
if cursor < max_lines:
line_x, line_y = line_positions[cursor]
if todo['project']:
@ -191,9 +191,9 @@ class Todoist(inkycal_module):
todo['name'], font=self.font, alignment='left')
cursor += 1
else:
logger.error('More todos than available lines')
break
else:
logger.error('More todos than available lines')
break
# return the images ready for the display
return im_black, im_colour