1
0
mirror of https://github.com/flarum/core.git synced 2025-08-08 01:16:52 +02:00

Remove deprecated preferenceSaver from settingspage

This commit is contained in:
Alexander Skvortsov
2020-08-10 00:49:50 -04:00
committed by Franz Liedke
parent 9691a6ab92
commit 38fed603f8

View File

@@ -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.
*