reload page if the user closes the modal or not clicking on the notification

This commit is contained in:
negue
2018-09-30 17:22:44 +02:00
parent 07bc374078
commit 5632031f16
3 changed files with 32 additions and 20 deletions

View File

@@ -363,7 +363,18 @@ export default {
this.playSound(config.sound);
}
if (forceToModal) {
if (type === 'REBIRTH_ACHIEVEMENT') {
// reload if the user hasn't clicked on the notification
const timeOut = setTimeout(() => {
window.location.reload(true);
}, 60000);
this.text(config.label(this.$t), () => {
// prevent the current reload timeout
clearTimeout(timeOut);
this.$root.$emit('bv::show::modal', config.modalId);
}, false);
} else if (forceToModal) {
this.$root.$emit('bv::show::modal', config.modalId);
} else {
this.text(config.label(this.$t), () => {