Skip to content

Make simple property getters/setters available in TaskData #613

@martiege

Description

@martiege

Hello!

I'm continuing to work on my small app, and as I've always found the "urgency" number pretty useful, I figured I'd also show this off in the app, so I've started to rewrite that part of the code.

The issue I came across, is that when I want to implement the urgency function for the scheduled property, I have to parse this value myself, instead of e.g. using the get_due method.

For now, I've essentially recreated the get_timestamp function from task.rs, which doesn't feel very satisfying.

I'm guessing that it isn't logical to have methods for all possible properties, but perhaps it could make sense to put some of the utility functions either in the TaskData structure, or in some separate utility module, so that the timestamp-functionality can be reused for the other relevant properties when necessary?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions