megamaz/GitStats

Switching tabs after launching fetch task

Closed this issue · 1 comments

This is an issue that occurs when the user switches to another tab whilst the app is doing its fetch task on a repository. The fetch task keeps running in the background, but the app does not expect this which means that when the fetch task finishes it will most likely be applied to the wrong repository.

Working on fixing this, so just a couple notes for myself;

  1. The user can remove the repo that is currently being loaded. I don't even want to know what happens if they do that. The most likely reason they'd have to do this is to attempt to "cancel" the issue loading.
  2. Best fix I have in mind is to just disable the top bar while issues are loading. This completely presents this problem from arising, but it also completely locks the app while issues are loading. This isn't a big issue right now as there aren't many features, but if I add more features in the future this will become a problem.
  3. Since I plan to add a way to filter which issues are loaded, cancelling the request before it finishes will become vital if the filters the user entered are wrong. Repos with thousands of issues take up to 5 minutes to load, and not being able to cancel the request will quickly become obnoxious.
  4. Typescript.