Open Desuuuu opened 6 years ago
I can see why users would want to change the poll interval, but why would they want to disable it?
If we do add a way to disable rate polling entirely, this should also make the "usd" option disappear from the UI.
People who do not need the rates or do not want to contact Bitstamp might want to disable it.
As far as the UI goes, I guess the change boils down to adding some logic that prevents toggling the unit to USD when the btcusd rate is not available. I had a look at the code to see how I would go about this, but I must say the code was a bit too intricate for me to figure it out right now.
I'll look into implementing this. This will require some refactoring in the way currency units are handled, so might take me a little while to get to it.
On a side note, I think you would appeal to more contributors if the codebase was easier for someone to get his hands on.
For example from what I've seen, the code contains a lot of inline arrow functions (sometimes quite complex), which saves a few lines of code, but really hinders readability.
Thanks, I'll look into improving readability. But note that other than the terse style, the usage of stream-based reactive programming also creates a non-negligible barrier to entry, as its not a very common programming style. I think that programmers experienced with this style would find the terse code easier to parse.
I feel like a startup option to configure/disable exchange rate polling would be useful.