[feature] Query media description limit (#62)

fixes #61

Reviewed-on: https://codeberg.org/superseriousbusiness/masto-fe-standalone/pulls/62
Co-authored-by: Sqx. Flann <fl4nn+codeberg@opensuse.org>
Co-committed-by: Sqx. Flann <fl4nn+codeberg@opensuse.org>
This commit is contained in:
Sqx. Flann
2025-06-23 10:51:25 +02:00
committed by tobi
parent 60792ec753
commit 6d0b964e2b
7 changed files with 38 additions and 9 deletions

View File

@@ -17,11 +17,18 @@ export const fetchServer = () => (dispatch, getState) => {
dispatch(fetchServerRequest());
api(getState)
.get('/api/v2/instance').then(({ data }) => {
try {
api(getState)
.get('/api/v2/instance').then({ data });
if (data.contact.account) dispatch(importFetchedAccount(data.contact.account));
dispatch(fetchServerSuccess(data));
} catch (e) {
api(getState)
.get('/api/v1/instance').then(({ data }) => {
if (data.contact.account) dispatch(importFetchedAccount(data.contact.account));
dispatch(fetchServerSuccess(data));
}).catch(err => dispatch(fetchServerFail(err)));
}
};
const fetchServerRequest = () => ({