Fixed display of RYA behind bailey (#9555)

This commit is contained in:
Keith Holliday
2017-11-20 12:38:26 -06:00
committed by GitHub
parent 5f468d16b7
commit 1845bd1e35
2 changed files with 11 additions and 7 deletions

View File

@@ -2,7 +2,7 @@
div div
yesterdaily-modal( yesterdaily-modal(
:yesterDailies='yesterDailies', :yesterDailies='yesterDailies',
@hide="runYesterDailiesAction()", @run-cron="runYesterDailiesAction()",
) )
armoire-empty armoire-empty
new-stuff new-stuff
@@ -210,6 +210,7 @@ export default {
}, },
watch: { watch: {
baileyShouldShow () { baileyShouldShow () {
if (this.user.needsCron) return;
this.$root.$emit('bv::show::modal', 'new-stuff'); this.$root.$emit('bv::show::modal', 'new-stuff');
}, },
userHp (after, before) { userHp (after, before) {
@@ -311,10 +312,6 @@ export default {
methods: { methods: {
checkUserAchievements () { checkUserAchievements () {
// List of prompts for user on changes. Sounds like we may need a refactor here, but it is clean for now // 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) { if (!this.user.flags.welcomed) {
this.$store.state.avatarEditorOptions.editingUser = false; this.$store.state.avatarEditorOptions.editingUser = false;
this.$root.$emit('bv::show::modal', 'avatar-modal'); this.$root.$emit('bv::show::modal', 'avatar-modal');
@@ -411,6 +408,8 @@ export default {
this.$store.dispatch('tasks:fetchUserTasks', {forceLoad: true}), this.$store.dispatch('tasks:fetchUserTasks', {forceLoad: true}),
]); ]);
this.$store.state.isRunningYesterdailies = false;
if (this.levelBeforeYesterdailies > 0 && this.levelBeforeYesterdailies < this.user.stats.lvl) { if (this.levelBeforeYesterdailies > 0 && this.levelBeforeYesterdailies < this.user.stats.lvl) {
this.showLevelUpNotifications(this.user.stats.lvl); this.showLevelUpNotifications(this.user.stats.lvl);
} }
@@ -422,10 +421,14 @@ export default {
this.$store.state.groupNotifications.push(notification); this.$store.state.groupNotifications.push(notification);
}, },
async handleUserNotifications (after) { async handleUserNotifications (after) {
if (!after || after.length === 0 || !Array.isArray(after)) return;
if (this.$store.state.isRunningYesterdailies) 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 notificationsToRead = [];
let scoreTaskNotification = []; let scoreTaskNotification = [];

View File

@@ -78,6 +78,7 @@ export default {
methods: { methods: {
async close () { async close () {
this.$root.$emit('bv::hide::modal', 'yesterdaily'); this.$root.$emit('bv::hide::modal', 'yesterdaily');
this.$emit('run-cron');
}, },
}, },
}; };