mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 07:07:35 +01:00
* Attempt to use party data from the store rather than always fetching it from the API * Move init code to shown() to prevent unnecessary network requests * Use store party data in getGroup action if possible to save an API call * Use store data rather than API call for party in challengeModal; remove unnecessary code in guilds:getGroup action * Create party:getParty action and employ it in Group and ChallengeModal * Use store instead of action return for party data * Change how party data is stored
This commit is contained in:
committed by
Sabe Jones
parent
183c90ac3a
commit
ce14a9dadb
@@ -538,16 +538,14 @@ export default {
|
||||
return;
|
||||
}
|
||||
|
||||
let group = await this.$store.dispatch('guilds:getGroup', {groupId: this.searchId});
|
||||
|
||||
if (this.isParty) {
|
||||
this.$store.state.party.data = group;
|
||||
await this.$store.dispatch('party:getParty');
|
||||
this.group = this.$store.state.party.data;
|
||||
this.checkForAchievements();
|
||||
return;
|
||||
} else {
|
||||
const group = await this.$store.dispatch('guilds:getGroup', {groupId: this.searchId});
|
||||
this.$set(this, 'group', group);
|
||||
}
|
||||
|
||||
this.$set(this, 'group', group);
|
||||
},
|
||||
deleteAllMessages () {
|
||||
if (confirm(this.$t('confirmDeleteAllMessages'))) {
|
||||
|
||||
Reference in New Issue
Block a user