From 78f5fc47fd84c685644d58c4847c98ace7b3fa1a Mon Sep 17 00:00:00 2001 From: WardPearce Date: Mon, 13 May 2024 14:22:51 +1200 Subject: [PATCH] Added ability to hide replies after expanded --- materialious/src/lib/Comment.svelte | 7 ++++++- materialious/src/lib/i18n/locales/en.json | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/materialious/src/lib/Comment.svelte b/materialious/src/lib/Comment.svelte index 53ec8c79..8ca4a2bb 100644 --- a/materialious/src/lib/Comment.svelte +++ b/materialious/src/lib/Comment.svelte @@ -7,7 +7,7 @@ export let comment: Comment; export let videoId: string; - let replies: Comments; + let replies: Comments | undefined = undefined; async function loadReplies(continuation: string) { try { @@ -75,6 +75,11 @@ expand_more {comment.replies.replyCount} {$_('replies')} + {:else if replies} + {/if} diff --git a/materialious/src/lib/i18n/locales/en.json b/materialious/src/lib/i18n/locales/en.json index 84151168..052f780e 100644 --- a/materialious/src/lib/i18n/locales/en.json +++ b/materialious/src/lib/i18n/locales/en.json @@ -12,6 +12,7 @@ "deleteAllHistory": "Delete all history", "skipping": "Skipping", "replies": "replies", + "hideReplies": "Hide replies", "hideVideo": "Hide video", "syncParty": { "userJoined": "User joined your watch party.",