Sam Therapy
4535046089
Some checks reported errors
continuous-integration/drone/push Build was killed
Was this last commit even tested? Apparently. Deployed? No. Doesn't even work VANILLA, WHY WOULD IT WORK ANYWHERE ELSE??? Thank you for coming to my complaint session.
24 lines
852 B
JavaScript
24 lines
852 B
JavaScript
const timelineVisibleUnauthenticated = (state, timeline) => (
|
|
publicTimelineVisible[timeline] ?? false
|
|
);
|
|
|
|
const currentUser = (state) => state.users.currentUser;
|
|
|
|
const currentUserOrTimelineVisibleUnauthenticated = (state, timeline) => (
|
|
currentUser(state) || timelineVisibleUnauthenticated(state, timeline)
|
|
);
|
|
|
|
const federatedTimelineAvailable = (state) => state.instance.federatedTimelineAvailable;
|
|
|
|
export const federatedTimelineVisible = (state) => (
|
|
federatedTimelineAvailable(state) && currentUserOrTimelineVisibleUnauthenticated(state, 'federated')
|
|
);
|
|
|
|
export const publicTimelineVisible = (state) => (
|
|
currentUserOrTimelineVisibleUnauthenticated(state, 'local')
|
|
);
|
|
|
|
export const bubbleTimelineVisible = (state) => (
|
|
state.instance.localBubbleInstances.length > 0 && currentUserOrTimelineVisibleUnauthenticated(state, 'bubble')
|
|
);
|