fix calculation of offsets due to new api response structure
This commit is contained in:
parent
10a8065ea9
commit
f3d951a93c
@ -135,12 +135,13 @@ class Todoist(inkycal_module):
|
|||||||
logger.debug(f'simplified: {simplified}')
|
logger.debug(f'simplified: {simplified}')
|
||||||
|
|
||||||
# Get maximum width of project names for selected font
|
# Get maximum width of project names for selected font
|
||||||
project_width = int(max([
|
project_width = int(max(
|
||||||
self.font.getsize(task['project'])[0] for task in simplified]) * 1.1)
|
[self.font.getsize(task['project']) for task in simplified]
|
||||||
|
) * 1.1)
|
||||||
|
|
||||||
# Get maximum width of project dues for selected font
|
# Get maximum width of project dues for selected font
|
||||||
due_width = int(max([
|
due_width = int(max([
|
||||||
self.font.getsize(task['due'])[0] for task in simplified]) * 1.1)
|
self.font.getsize(task['due']) for task in simplified]) * 1.1)
|
||||||
|
|
||||||
# Group tasks by project name
|
# Group tasks by project name
|
||||||
grouped = {name: [] for id_, name in all_projects.items()}
|
grouped = {name: [] for id_, name in all_projects.items()}
|
||||||
|
Loading…
Reference in New Issue
Block a user