kopia lustrzana https://gitlab.com/soapbox-pub/soapbox
Remove Trending Truths
rodzic
f01d088d06
commit
f3ff33ff50
|
@ -17,10 +17,10 @@ const fetchTrendingStatuses = () =>
|
||||||
const instance = state.instance;
|
const instance = state.instance;
|
||||||
const features = getFeatures(instance);
|
const features = getFeatures(instance);
|
||||||
|
|
||||||
if (!features.trendingStatuses && !features.trendingTruths) return;
|
if (!features.trendingStatuses) return;
|
||||||
|
|
||||||
dispatch({ type: TRENDING_STATUSES_FETCH_REQUEST });
|
dispatch({ type: TRENDING_STATUSES_FETCH_REQUEST });
|
||||||
return api(getState).get(features.trendingTruths ? '/api/v1/truth/trending/truths' : '/api/v1/trends/statuses').then(({ data: statuses }) => {
|
return api(getState).get('/api/v1/trends/statuses').then(({ data: statuses }) => {
|
||||||
dispatch(importFetchedStatuses(statuses));
|
dispatch(importFetchedStatuses(statuses));
|
||||||
dispatch({ type: TRENDING_STATUSES_FETCH_SUCCESS, statuses });
|
dispatch({ type: TRENDING_STATUSES_FETCH_SUCCESS, statuses });
|
||||||
return statuses;
|
return statuses;
|
||||||
|
|
|
@ -923,12 +923,6 @@ const getInstanceFeatures = (instance: Instance) => {
|
||||||
v.software === MASTODON && gte(v.compatVersion, '3.5.0'),
|
v.software === MASTODON && gte(v.compatVersion, '3.5.0'),
|
||||||
]),
|
]),
|
||||||
|
|
||||||
/**
|
|
||||||
* Truth Social trending statuses API.
|
|
||||||
* @see GET /api/v1/truth/trending/truths
|
|
||||||
*/
|
|
||||||
trendingTruths: v.software === TRUTHSOCIAL,
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Can display trending hashtags.
|
* Can display trending hashtags.
|
||||||
* @see GET /api/v1/trends
|
* @see GET /api/v1/trends
|
||||||
|
|
Ładowanie…
Reference in New Issue