Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion resources/js/layouts/app-layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,18 @@ export default function AppLayout({ children }: AppLayoutProps) {
const showShortcuts = useCallback(() => setIsShowingShortcuts(true), []);
const openSearch = useCallback(() => setIsSearching(true), []);
const isGuest = auth.user === null;
// Public feeds and documents have no unread counts and cannot be deleted.
const skipCountPolling =
isGuest &&
[
'log/show',
'about/show',
'brand/show',
'changelog/show',
'privacy/show',
'search/index',
'terms/show',
].includes(component);
const isMessages = component.startsWith('conversation/');
const hasComposer = component === 'log/show' && !isGuest;
const isComposerInView = useIsComposerInView();
Expand Down Expand Up @@ -124,7 +136,7 @@ export default function AppLayout({ children }: AppLayoutProps) {
data-nav={isLayoutOpen ? 'expanded' : 'collapsed'}
className="mx-auto flex min-h-svh w-full max-w-[1264px] justify-center"
>
{deletedPage === null && (
{deletedPage === null && !skipCountPolling && (
<NotificationCountPolling
key={isHearingCounts ? 'heard' : 'polled'}
interval={isHearingCounts ? 300_000 : 30_000}
Expand Down