feat: refresh branch info when window gets focused or branch changed
This MR adds two additional triggers for refreshing the current branch information.
- focusing the VS Code window if it was 30s since the last refresh
- changing branch
Until this MR we were simply refreshing every 30s, skipping if the window wasn't active.
If I had more time, I'd investigate if we can use rx.js or something similar to avoid the setInterval
which is very hard to test. But this issue already took several days over what I planned and so I opted for this easy solution.
Related to #60 (closed)
Edited by Tomas Vik