From 1845bd1e354174ad992dbf33ad540f0d93bfdd81 Mon Sep 17 00:00:00 2001 From: Keith Holliday Date: Mon, 20 Nov 2017 12:38:26 -0600 Subject: [PATCH] Fixed display of RYA behind bailey (#9555) --- website/client/components/notifications.vue | 17 ++++++++++------- website/client/components/yesterdailyModal.vue | 1 + 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/website/client/components/notifications.vue b/website/client/components/notifications.vue index fe375482b6..164c5c13cd 100644 --- a/website/client/components/notifications.vue +++ b/website/client/components/notifications.vue @@ -2,7 +2,7 @@ div yesterdaily-modal( :yesterDailies='yesterDailies', - @hide="runYesterDailiesAction()", + @run-cron="runYesterDailiesAction()", ) armoire-empty new-stuff @@ -210,6 +210,7 @@ export default { }, watch: { baileyShouldShow () { + if (this.user.needsCron) return; this.$root.$emit('bv::show::modal', 'new-stuff'); }, userHp (after, before) { @@ -311,10 +312,6 @@ export default { methods: { checkUserAchievements () { // List of prompts for user on changes. Sounds like we may need a refactor here, but it is clean for now - if (this.user.flags.newStuff) { - this.$root.$emit('bv::show::modal', 'new-stuff'); - } - if (!this.user.flags.welcomed) { this.$store.state.avatarEditorOptions.editingUser = false; this.$root.$emit('bv::show::modal', 'avatar-modal'); @@ -411,6 +408,8 @@ export default { this.$store.dispatch('tasks:fetchUserTasks', {forceLoad: true}), ]); + this.$store.state.isRunningYesterdailies = false; + if (this.levelBeforeYesterdailies > 0 && this.levelBeforeYesterdailies < this.user.stats.lvl) { this.showLevelUpNotifications(this.user.stats.lvl); } @@ -422,10 +421,14 @@ export default { this.$store.state.groupNotifications.push(notification); }, async handleUserNotifications (after) { - if (!after || after.length === 0 || !Array.isArray(after)) return; - if (this.$store.state.isRunningYesterdailies) return; + if (this.user.flags.newStuff) { + this.$root.$emit('bv::show::modal', 'new-stuff'); + } + + if (!after || after.length === 0 || !Array.isArray(after)) return; + let notificationsToRead = []; let scoreTaskNotification = []; diff --git a/website/client/components/yesterdailyModal.vue b/website/client/components/yesterdailyModal.vue index 4e3f675978..698b98c1ec 100644 --- a/website/client/components/yesterdailyModal.vue +++ b/website/client/components/yesterdailyModal.vue @@ -78,6 +78,7 @@ export default { methods: { async close () { this.$root.$emit('bv::hide::modal', 'yesterdaily'); + this.$emit('run-cron'); }, }, };