Wrapstodon: Load report data only on display (#37269)

This commit is contained in:
Echo authored and GitHub committed 2025-12-16 13:00:40 +00:00
1 parent 9e97ad04d8
commit a9c84529b2
8 files changed
+33 -42

No files matched your search

@@ -1,5 +1,3 @@
import { checkAnnualReport } from '@/mastodon/reducers/slices/annual_report';
import api from '../api';
import { importFetchedAccount } from './importer';
@@ -31,9 +29,6 @@ export const fetchServer = () => (dispatch, getState) => {
.get('/api/v2/instance').then(({ data }) => {
if (data.contact.account) dispatch(importFetchedAccount(data.contact.account));
dispatch(fetchServerSuccess(data));
if (data.wrapstodon) {
void dispatch(checkAnnualReport());
}
}).catch(err => dispatch(fetchServerFail(err)));
};