Web:Common:Delete onSaveSelectedNewThemes.

This commit is contained in:
Vlada Gazizova 2022-11-02 16:05:02 +03:00
parent ba654c5eb7
commit 36bd8eab14

View File

@ -687,26 +687,6 @@ class SettingsStore {
this.setCurrentColorScheme(currentColorScheme); this.setCurrentColorScheme(currentColorScheme);
}; };
onSaveSelectedNewThemes = async (
newCustomThemes,
selectNewThemeId,
arrLengthBeforeChange
) => {
let newAppearanceTheme = [];
await this.sendAppearanceTheme({ themes: newCustomThemes });
await api.settings.getAppearanceTheme().then((res) => {
newAppearanceTheme = res.themes;
});
const customThemes = newAppearanceTheme.slice(arrLengthBeforeChange);
const selectTheme = customThemes[selectNewThemeId - 1];
await this.sendAppearanceTheme({ selected: selectTheme.id });
await this.getAppearanceTheme();
};
sendAppearanceTheme = async (data) => { sendAppearanceTheme = async (data) => {
return api.settings.sendAppearanceTheme(data); return api.settings.sendAppearanceTheme(data);
}; };