kopia lustrzana https://gitlab.com/soapbox-pub/soapbox
Merge remote-tracking branch 'soapbox/develop' into ts
commit
7d8c33625d
|
@ -264,7 +264,8 @@ describe('fetchAccountByUsername()', () => {
|
||||||
});
|
});
|
||||||
expect(actions[1].type).toEqual('ACCOUNTS_IMPORT');
|
expect(actions[1].type).toEqual('ACCOUNTS_IMPORT');
|
||||||
expect(actions[2].type).toEqual('ACCOUNT_LOOKUP_SUCCESS');
|
expect(actions[2].type).toEqual('ACCOUNT_LOOKUP_SUCCESS');
|
||||||
expect(actions[3].type).toEqual('ACCOUNT_FETCH_SUCCESS');
|
expect(actions[3].type).toEqual('RELATIONSHIPS_FETCH_REQUEST');
|
||||||
|
expect(actions[4].type).toEqual('ACCOUNT_FETCH_SUCCESS');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -176,6 +176,7 @@ export function fetchAccountByUsername(username, history) {
|
||||||
});
|
});
|
||||||
} else if (features.accountLookup) {
|
} else if (features.accountLookup) {
|
||||||
return dispatch(accountLookup(username)).then(account => {
|
return dispatch(accountLookup(username)).then(account => {
|
||||||
|
dispatch(fetchRelationships([account.id]));
|
||||||
dispatch(fetchAccountSuccess(account));
|
dispatch(fetchAccountSuccess(account));
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
dispatch(fetchAccountFail(null, error));
|
dispatch(fetchAccountFail(null, error));
|
||||||
|
|
|
@ -69,10 +69,21 @@ export function importFetchedStatus(status, idempotencyKey) {
|
||||||
dispatch(importFetchedStatus(status.quote));
|
dispatch(importFetchedStatus(status.quote));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Pleroma quotes
|
||||||
if (status.pleroma?.quote?.id) {
|
if (status.pleroma?.quote?.id) {
|
||||||
dispatch(importFetchedStatus(status.pleroma.quote));
|
dispatch(importFetchedStatus(status.pleroma.quote));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Fedibird quote from reblog
|
||||||
|
if (status.reblog?.quote?.id) {
|
||||||
|
dispatch(importFetchedStatus(status.reblog.quote));
|
||||||
|
}
|
||||||
|
|
||||||
|
// Pleroma quote from reblog
|
||||||
|
if (status.reblog?.pleroma?.quote?.id) {
|
||||||
|
dispatch(importFetchedStatus(status.reblog.pleroma.quote));
|
||||||
|
}
|
||||||
|
|
||||||
if (status.poll?.id) {
|
if (status.poll?.id) {
|
||||||
dispatch(importFetchedPoll(status.poll));
|
dispatch(importFetchedPoll(status.poll));
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,7 +27,7 @@ const DurationSelector = ({ onDurationChange }: IDurationSelector) => {
|
||||||
now.setMinutes(now.getMinutes() + minutes);
|
now.setMinutes(now.getMinutes() + minutes);
|
||||||
now.setHours(now.getHours() + hours);
|
now.setHours(now.getHours() + hours);
|
||||||
|
|
||||||
return (now - future) / 1000;
|
return Math.round((now - future) / 1000);
|
||||||
}, [days, hours, minutes]);
|
}, [days, hours, minutes]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|
Ładowanie…
Reference in New Issue