mirror of
https://github.com/flarum/core.git
synced 2025-08-08 09:26:34 +02:00
Remove deprecated preferenceSaver from settingspage
This commit is contained in:
committed by
Franz Liedke
parent
9691a6ab92
commit
38fed603f8
@@ -87,26 +87,6 @@ export default class SettingsPage extends UserPage {
|
||||
return items;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated beta 14, remove in beta 15.
|
||||
*
|
||||
* Generate a callback that will save a value to the given preference.
|
||||
*
|
||||
* @param {String} key
|
||||
* @return {Function}
|
||||
*/
|
||||
preferenceSaver(key) {
|
||||
return (value, component) => {
|
||||
if (component) component.props.loading = true;
|
||||
m.redraw();
|
||||
|
||||
this.user.savePreferences({ [key]: value }).then(() => {
|
||||
if (component) component.props.loading = false;
|
||||
m.redraw();
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Build an item list for the user's privacy settings.
|
||||
*
|
||||
|
Reference in New Issue
Block a user