diff --git a/src/components/modals/main/settings/sections/background/Background.jsx b/src/components/modals/main/settings/sections/background/Background.jsx
index 3b9c62f5..c0596462 100644
--- a/src/components/modals/main/settings/sections/background/Background.jsx
+++ b/src/components/modals/main/settings/sections/background/Background.jsx
@@ -44,7 +44,8 @@ export default class BackgroundSettings extends PureComponent {
this.forceUpdate();
localStorage.setItem('customBackground', JSON.stringify(customBackground));
- EventBus.dispatch('refresh', 'background');
+ document.querySelector('.reminder-info').style.display = 'block';
+ localStorage.setItem('showReminder', true);
}
addCustomBackground() {
@@ -102,6 +103,15 @@ export default class BackgroundSettings extends PureComponent {
return data;
}
+ uploadCustombackground(index) {
+ document.getElementById('bg-input').setAttribute('index', index);
+ document.getElementById('bg-input').click();
+ // to fix loadFunction
+ this.setState({
+ currentBackgroundIndex: index
+ });
+ }
+
async getBackgroundCategories() {
const data = await (await fetch(window.constants.API_URL + '/images/categories', { signal: this.controller.signal })).json();
@@ -191,13 +201,13 @@ export default class BackgroundSettings extends PureComponent {
{this.state.customBackground.length > 1 ? : null}
this.customBackground(e, true, index)}>
- document.getElementById('bg-input').click(index)}>{background.source.upload}
+ this.uploadCustombackground(index)}>{background.source.upload}
{this.videoCustomSettings(index)}
))}
- this.customBackground(e)} />
+ this.customBackground(e, false, this.state.currentBackgroundIndex)} />
>
);