Skip to content

Commit

Permalink
Add setting to hide chat summary
Browse files Browse the repository at this point in the history
  • Loading branch information
FlaminSarge committed Nov 2, 2024
1 parent 7ef9437 commit 8f59f9a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/components/Hyperchat.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
showUsernames,
showTimestamps,
showUserBadges,
showChatSummary,
refreshScroll,
emojiRenderMode,
useSystemEmojis,
Expand Down Expand Up @@ -398,9 +399,9 @@
</div>
{/each}
</div>
{#if summary || pinned}
{#if (summary && $showChatSummary) || pinned}
<div class="absolute top-0 w-full" bind:this={topBar}>
{#if summary}
{#if summary && $showChatSummary}
<div class="mx-1.5 mt-1.5">
<ChatSummary summary={summary} on:resize={topBarResized} />
</div>
Expand Down
4 changes: 3 additions & 1 deletion src/components/settings/InterfaceSettings.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
useSystemEmojis,
isDark,
enableStickySuperchatBar,
enableHighlightedMentions
enableHighlightedMentions,
showChatSummary
} from '../../ts/storage';
import { themeItems, emojiRenderItems } from '../../ts/chat-constants';
import Card from '../common/Card.svelte';
Expand Down Expand Up @@ -59,6 +60,7 @@
<Checkbox name="Show timestamps" store={showTimestamps} />
<Checkbox name="Show usernames" store={showUsernames} />
<Checkbox name="Show user badges" store={showUserBadges} />
<Checkbox name="Show YouTube's chat summary" store={showChatSummary} />
<Checkbox name="Highlight mentions" store={enableHighlightedMentions} />
</Card>

Expand Down
1 change: 1 addition & 0 deletions src/ts/storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ export const showProfileIcons = stores.addSyncStore('hc.messages.showProfileIcon
export const showUsernames = stores.addSyncStore('hc.messages.showUsernames', true);
export const showTimestamps = stores.addSyncStore('hc.messages.showTimestamps', false);
export const showUserBadges = stores.addSyncStore('hc.messages.showUserBadges', true);
export const showChatSummary = stores.addSyncStore('hc.messages.showChatSummary', true);
export const lastClosedVersion = stores.addSyncStore('hc.lastClosedVersion', '');
export const showOnlyMemberChat = stores.addSyncStore('hc.showOnlyMemberChat', false);
export const emojiRenderMode = stores.addSyncStore('hc.emojiRenderMode', YoutubeEmojiRenderMode.SHOW_ALL);
Expand Down

0 comments on commit 8f59f9a

Please sign in to comment.