harbassan / spicetify-apps

A collection of spicetify custom apps to improve your spotify experience.
380 stars 23 forks source link

[Enhancement] Disable Reruns on every click #4

Closed Satanarious closed 1 year ago

Satanarious commented 1 year ago

The App works flawlessly without any problems. But I think re-running the calculations or functions again to calculate the stats for each tab is unnecessary. Instead, you can load the stats for all the tabs at once as soon as the user first clicks the custom app in the sidebar. Also, don't re-run them after every time one of the tabs is clicked, save data someplace and update it with a refresh button that the user can click. This button would obviously be triggerable after the first run after the user clicks the custom app in the sidebar.

Lemme know what you think.

harbassan commented 1 year ago

Yeah I was thinking about doing caching, would definitely help with limiting api calls aswell. When I have time ill try and implement something like this.