From 94dcd1606a7e39daa4aadbd3d23f373b3a4ec7a8 Mon Sep 17 00:00:00 2001 From: Lim Chee Aun Date: Fri, 1 Mar 2024 13:20:34 +0800 Subject: [PATCH] Make toast stay longer, due to longer text --- src/pages/catchup.jsx | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/pages/catchup.jsx b/src/pages/catchup.jsx index d9aad889..69e1f27c 100644 --- a/src/pages/catchup.jsx +++ b/src/pages/catchup.jsx @@ -493,15 +493,18 @@ function Catchup() { const groupByText = { account: 'authors', }; - let toast = showToast( - `Showing ${filterCategoryText[selectedFilterCategory] || 'all posts'}${ - authorUsername ? ` by @${authorUsername}` : '' - }, ${sortByText[sortBy][sortOrderIndex]} first${ + let toast = showToast({ + duration: 5_000, // 5 seconds + text: `Showing ${ + filterCategoryText[selectedFilterCategory] || 'all posts' + }${authorUsername ? ` by @${authorUsername}` : ''}, ${ + sortByText[sortBy][sortOrderIndex] + } first${ !!groupBy ? `, grouped by ${groupBy === 'account' ? groupByText[groupBy] : ''}` : '' }`, - ); + }); return () => { toast?.hideToast?.(); };