FlashpointProject / launcher

Launcher for Flashpoint Archive
https://flashpointarchive.org
Other
971 stars 55 forks source link

Fix logoset caching. #342

Closed LindirQuenya closed 2 years ago

LindirQuenya commented 2 years ago

This resolves #280.

Previously: the preference-changed event for logoSet (and hence the requests for the new logos, so that they can be displayed below the dropdown) was emitted without waiting for the UPDATE_PREFERENCES signal to be sent to the backend. This was caused by a combination of throttling and using send instead of request. It resulted in a mixture of the previous and correct logo sets - some logo requests were processed by the backend pre-change, some post-change. The "new" images, once requested, were cached by the frontend until the next logoSet change.

Now: for logoSet only, we await the completion of the backend request before emitting the preference-changed event.

coveralls commented 2 years ago

Pull Request Test Coverage Report for Build 2401468646


Changes Missing Coverage Covered Lines Changed/Added Lines %
src/shared/preferences/util.ts 3 11 27.27%
<!-- Total: 14 22 63.64% -->
Totals Coverage Status
Change from base Build 2397456263: 1.6%
Covered Lines: 399
Relevant Lines: 627

💛 - Coveralls