From 958109752b834f5f84cbaf0b567348540f7a3a14 Mon Sep 17 00:00:00 2001 From: ccbikai Date: Tue, 13 Aug 2024 12:03:20 +0800 Subject: [PATCH] refactor: improve pagination logic and URL handling Enhanced pagination logic by adjusting the condition for displaying the 'Before' link, ensuring it appears when there's more than one item, improving user navigation. Improved URL handling in Telegram post and reply processing by using regular expressions for channel replacement, enhancing compatibility and robustness. --- src/components/list.astro | 2 +- src/lib/telegram/index.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/list.astro b/src/components/list.astro index 99025b5..1932bb7 100644 --- a/src/components/list.astro +++ b/src/components/list.astro @@ -22,7 +22,7 @@ const afterCursor = posts[0]?.id
{ - before && beforeCursor > 20 ? ( + before && beforeCursor > 1 ? ( { $(a)?.attr('href', `/search/${encodeURIComponent($(a)?.text())}`)