mirror of
https://github.com/flarum/core.git
synced 2025-07-29 20:50:28 +02:00
Allow locale to be selected in footer
This commit is contained in:
@@ -98,13 +98,10 @@ export default class SettingsPage extends UserPage {
|
||||
*/
|
||||
preferenceSaver(key) {
|
||||
return (value, component) => {
|
||||
const preferences = this.user.preferences();
|
||||
preferences[key] = value;
|
||||
|
||||
if (component) component.loading = true;
|
||||
m.redraw();
|
||||
|
||||
this.user.save({preferences}).then(() => {
|
||||
this.user.savePreferences({[key]: value}).then(() => {
|
||||
if (component) component.loading = false;
|
||||
m.redraw();
|
||||
});
|
||||
|
Reference in New Issue
Block a user