mirror of
https://github.com/cheeaun/phanpy.git
synced 2024-11-25 10:45:41 +03:00
Fix federated feed only showing remote posts
There's a mismatch parameter between Mastodon's and Pixelfed's APIs
This commit is contained in:
parent
dea3507053
commit
1c01e1b0f4
2 changed files with 9 additions and 4 deletions
|
@ -10,6 +10,7 @@ import { api } from '../utils/api';
|
|||
import { filteredItems } from '../utils/filters';
|
||||
import states from '../utils/states';
|
||||
import { saveStatus } from '../utils/states';
|
||||
import supports from '../utils/supports';
|
||||
import useTitle from '../utils/useTitle';
|
||||
|
||||
const LIMIT = 20;
|
||||
|
@ -30,11 +31,14 @@ function Public({ local, columnMode, ...props }) {
|
|||
const publicIterator = useRef();
|
||||
async function fetchPublic(firstLoad) {
|
||||
if (firstLoad || !publicIterator.current) {
|
||||
publicIterator.current = masto.v1.timelines.public.list({
|
||||
const opts = {
|
||||
limit: LIMIT,
|
||||
local: isLocal,
|
||||
remote: !isLocal, // Pixelfed
|
||||
});
|
||||
local: isLocal || undefined,
|
||||
};
|
||||
if (!isLocal && supports('@pixelfed/global-feed')) {
|
||||
opts.remote = true;
|
||||
}
|
||||
publicIterator.current = masto.v1.timelines.public.list(opts);
|
||||
}
|
||||
const results = await publicIterator.current.next();
|
||||
let { value } = results;
|
||||
|
|
|
@ -19,6 +19,7 @@ const platformFeatures = {
|
|||
'@mastodon/profile-private-note': notContainPixelfed,
|
||||
'@pixelfed/trending': containPixelfed,
|
||||
'@pixelfed/home-include-reblogs': containPixelfed,
|
||||
'@pixelfed/global-feed': containPixelfed,
|
||||
};
|
||||
const supportsCache = {};
|
||||
|
||||
|
|
Loading…
Reference in a new issue