From 86d75b9252adaac67df33f523a951198b4dd0ff9 Mon Sep 17 00:00:00 2001 From: Innei Date: Mon, 30 Jun 2025 20:15:08 +0800 Subject: [PATCH] feat(timeline): enhance unread message indicator with animated visibility - Wrapped the UnreadCount component in an Animated.View to improve visibility during drag interactions. - Added opacity animation based on drag progress to create a smoother user experience. Signed-off-by: Innei --- .../modules/screen/TimelineViewSelector.tsx | 25 ++++++++++++++----- 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/apps/mobile/src/modules/screen/TimelineViewSelector.tsx b/apps/mobile/src/modules/screen/TimelineViewSelector.tsx index c10984fea..28ba4bc6a 100644 --- a/apps/mobile/src/modules/screen/TimelineViewSelector.tsx +++ b/apps/mobile/src/modules/screen/TimelineViewSelector.tsx @@ -199,12 +199,25 @@ function ViewItem({ > {t(view.name)} - + ({ + opacity: interpolate( + dragProgress.get(), + [index - 1, index, index + 1], + [0, 1, 0], + "clamp", + ), + }))} + > + {unreadCount > 0 && ( + + )} + {/* Unread indicator for inactive items */}