only fetch privileged resources when appropriate #288
|
@ -399,6 +399,14 @@ const afterStoreSetup = async ({ store, i18n }) => {
|
|||
])
|
||||
|
||||
// Start fetching things that don't need to block the UI
|
||||
const currentUser = store.state.users.currentUser
|
||||
if (currentUser) {
|
||||
store.dispatch('fetchMutes')
|
||||
store.dispatch('startFetchingAnnouncements')
|
||||
if (currentUser.role === 'admin' || currentUser.role === 'moderator') {
|
||||
store.dispatch('startFetchingReports')
|
||||
}
|
||||
}
|
||||
getTOS({ store })
|
||||
getStickers({ store })
|
||||
|
||||
|
|
Loading…
Reference in a new issue