Skip to content

Commit

Permalink
Add support for Mastodon+Chuckya's Bubble timeline
Browse files Browse the repository at this point in the history
  • Loading branch information
Steffo99 committed Dec 9, 2024
1 parent cd317b5 commit 05b9016
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/nav-menu.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ function NavMenu(props) {
return results;
}

const hasBubbleTimeline = supports("@akkoma/bubble-timeline");
const hasBubbleTimeline = supports("@akkoma/bubble-timeline") || supports("@chuckya/bubble-timeline");

const buttonClickTS = useRef();
return (
Expand Down
3 changes: 2 additions & 1 deletion src/pages/public.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function Public({ variant = 'federated', columnMode, ...props }) {
}[variant];
const source = {
local: masto.v1.timelines.public.list,
bubble: masto.v1.timelines.bubble.list, // Bubble timeline isn't officially supported in Masto, but this seems to work nevertheless
bubble: supports('@akkoma/bubble-timeline') ? masto.v1.timelines.bubble.list : masto.v1.timelines.public.list,
federated: masto.v1.timelines.public.list,
}[variant];

Expand All @@ -53,6 +53,7 @@ function Public({ variant = 'federated', columnMode, ...props }) {
const opts = {
limit: LIMIT,
local: variant === 'local',
bubble: variant === 'bubble' && supports('@chuckya/bubble-timeline')
};
if (variant === 'federated' && supports('@pixelfed/global-feed')) {
opts.remote = true;
Expand Down
2 changes: 2 additions & 0 deletions src/utils/supports.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ const notContainPixelfed = /^(?!.*pixelfed).*$/i;
const containPleroma = /pleroma/i;
const containAkkoma = /akkoma/i;
const containGTS = /gotosocial/i;
const containChuckya = /chuckya/i;
const platformFeatures = {
'@mastodon/lists': notContainPixelfed,
'@mastodon/filters': notContainPixelfed,
Expand All @@ -25,6 +26,7 @@ const platformFeatures = {
'@pixelfed/global-feed': containPixelfed,
'@pleroma/local-visibility-post': containPleroma,
'@akkoma/local-visibility-post': containAkkoma,
'@chuckya/bubble-timeline': containChuckya,
};
const advertisedFeatures = {
'@akkoma/bubble-timeline': "bubble_timeline",
Expand Down

0 comments on commit 05b9016

Please sign in to comment.