Merge branch '884-about-panel-optimizations' into 'develop'

StaffPanel: Move staff loading to panel creation.

Closes #884

See merge request pleroma/pleroma-fe!1171
This commit is contained in:
Shpuld Shpludson 2020-07-07 12:53:49 +00:00
commit 8f87a36a5a
3 changed files with 9 additions and 1 deletions

View file

@ -266,6 +266,11 @@ const users = {
mutations,
getters,
actions: {
fetchUserIfMissing (store, id) {
if (!store.getters.findUser(id)) {
store.dispatch('fetchUser', id)
}
},
fetchUser (store, id) {
return store.rootState.api.backendInteractor.fetchUser({ id })
.then((user) => {