From 69786fb4dfee02e11857875581cbcd8d71530ab4 Mon Sep 17 00:00:00 2001 From: aceisace Date: Tue, 4 Oct 2022 23:56:43 +0200 Subject: [PATCH] fix problem where todos were only shown of a single group --- inkycal/modules/inkycal_todoist.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/inkycal/modules/inkycal_todoist.py b/inkycal/modules/inkycal_todoist.py index 7c4c781..808baa5 100644 --- a/inkycal/modules/inkycal_todoist.py +++ b/inkycal/modules/inkycal_todoist.py @@ -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