ryanbarr / harvest-monster

A tool to help you sell Path of Exile Harvest crafts on The Forbidden Trove.
https://www.harvestmonster.com
GNU General Public License v3.0
10 stars 1 forks source link

Language selection is applied and saved immediately. Fixes #8. #9

Closed ryanbarr closed 2 years ago

ryanbarr commented 2 years ago

Settings was incorrectly using on:change on a select to trigger locale updates and settings saves.

This change moves the logic for applying a new locale and saving it to the afterUpdate part of the component lifecycle. Since the select is utilizing bind:value to update the currently selected code, we can key off currentLanguage which updates based on that bound value. When the component updates, we can save currentLanguage instead.