Closed Ultimatum22 closed 1 year ago
Thanks for the PR! The code is a lot more cleaner that what I have done... (I'm not proud of it though) Also, can you add a screenshot of the working list?
I was a bit confused about the endpoint check because the one from Hive is never the same as the one set hardcoded in formula_one.dart, because the default values differ. I left it the same for now.
I know that it is a bit confusing, but I created the server to support the web version (mostly). So, when using a boxbox server, the API url has to be changed, but also the main website url, as it is blocked by the CORS too. So when the server is changed (e.g., the endpoint here), the main website url is changed too. I hope that it is clear enough.
Ah damn, sorry forgot about the screenshot.
Thanks for the PR! The code is a lot more cleaner that what I have done... (I'm not proud of it though) Also, can you add a screenshot of the working list?
I was a bit confused about the endpoint check because the one from Hive is never the same as the one set hardcoded in formula_one.dart, because the default values differ. I left it the same for now.
I know that it is a bit confusing, but I created the server to support the web version (mostly). So, when using a boxbox server, the API url has to be changed, but also the main website url, as it is blocked by the CORS too. So when the server is changed (e.g., the endpoint here), the main website url is changed too. I hope that it is clear enough.
Ah that does make sense, only the endpoint variable set now is never used so always different.
I can refactor the rest of the class if you want me too.
Ah that does make sense, only the endpoint variable set now is never used so always different.
I can refactor the rest of the class if you want me too.
You can if you want to, but I think that a rewrite would be more appropriate when a function breaks, like this one. I'm not sure if it is a really good way to do, but at least it is easier. Anyway, thanks for the PR & your efforts.
I kind of rewrote the logic to be more generic and account for changes on formula1 side, as long as they don't change the html.
I was a bit confused about the endpoint check because the one from Hive is never the same as the one set hardcoded in formula_one.dart, because the default values differ. I left it the same for now.