Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fetch projects if not in cache #119

Open
pumbas600 opened this issue Jul 15, 2024 · 0 comments
Open

Fetch projects if not in cache #119

pumbas600 opened this issue Jul 15, 2024 · 0 comments

Comments

@pumbas600
Copy link

pumbas600 commented Jul 15, 2024

Currently, if you do @[ProjectName] using a project not in the cache (I.e. any new projects) then it doesn't return any results.

This is because the filteredProjects list at this line https://github.com/JamesNZL/flow-toggl-plugin/blob/main/src/TogglTrack.cs#L933 is empty.

Currently, you can get around this by doing tgl refresh to clear the cache and then getting it to refetch everything.

Ideally, if the filteredProjects list is empty, then an API call will be made to see if there are any new projects. Some considerations I've not had time to dig into:

  • How often is this function called? Ideally, this logic should only be run if the query has stabilised.
  • The rate limit of the Toggl API. If it's fairly conservative, then potentially, it should only do this if you're not close to hitting the rate limit.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant