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

Keep last price when no Internet connection #80

Closed
Marubozu opened this issue Mar 21, 2018 · 3 comments · Fixed by #85
Closed

Keep last price when no Internet connection #80

Marubozu opened this issue Mar 21, 2018 · 3 comments · Fixed by #85
Assignees

Comments

@Marubozu
Copy link

Hi, thanks for such cool feature!

When a computer is not connected to Internet (bus, plane, etc.) or the connection drops, the currency label shows a long error message instead of the currency details (price, arrows, etc.).

Would it be possible to add a feature that would keep displayed the last price which was available before the connection dropped rather than displaying an error message that takes the whole Touch Bar?

Thank you :)

@chrislennon
Copy link
Owner

chrislennon commented Mar 21, 2018

@Marubozu no problem, thanks for using it!

Yeah the errors received when offline aren't the nicest looking 😭 (as a side note this should probably be corrected regardless of this issue)

I will need to have a think on this one - my first thoughts - whilst I like the outcome, showing the last available price. I have two points I would need to work out before pushing it live:

  • Writing/reading to/from disk - whilst not a big issue, will need to have a think about how I implement it sensibly
  • How to handle false positive errors, i.e. last price is still shown but there is actually an error receiving a new price.

I'll have a think and see if there is a good way of approaching this 👍

@chrislennon chrislennon self-assigned this Mar 21, 2018
@Marubozu
Copy link
Author

Hi Chris, I was sure it would be more complex to develop that it seems! If I can be of any help though let me know, I'll be happy to help you.

@chrislennon
Copy link
Owner

Better late than never I guess... A recent refactor made this much simpler to implement.

Need to do some double checking but when #85 merges this should enable a limited form of caching to prevent errors whilst offline.

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

Successfully merging a pull request may close this issue.

2 participants