diff --git a/src/screens/message/MessageListScreen.tsx b/src/screens/message/MessageListScreen.tsx index 4cacb9d..d699ce7 100644 --- a/src/screens/message/MessageListScreen.tsx +++ b/src/screens/message/MessageListScreen.tsx @@ -475,11 +475,16 @@ export const MessageListScreen: React.FC = () => { }; }; - // 合并列表数据 + // 合并列表数据:系统消息与普通会话一起按时间排序 const listData: ConversationResponse[] = [ createSystemMessageItem(), ...conversationList, - ]; + ].sort((a, b) => { + const aPinned = a.is_pinned ? 1 : 0; + const bPinned = b.is_pinned ? 1 : 0; + if (aPinned !== bPinned) return bPinned - aPinned; + return new Date(b.updated_at).getTime() - new Date(a.updated_at).getTime(); + }); const listConvRef = useRef(new Map()); listConvRef.current = new Map(listData.map((c) => [String(c.id), c])); @@ -981,6 +986,9 @@ function createMessageListStyles(colors: AppColors) { color: colors.primary.contrast, fontSize: 11, fontWeight: '600', + lineHeight: 18, + textAlignVertical: 'center', + includeFontPadding: false, }, headerRight: { width: 44, diff --git a/src/screens/message/components/ConversationListRow.tsx b/src/screens/message/components/ConversationListRow.tsx index 67f8377..5ce9ebb 100644 --- a/src/screens/message/components/ConversationListRow.tsx +++ b/src/screens/message/components/ConversationListRow.tsx @@ -265,6 +265,9 @@ function createConversationRowStyles(colors: AppColors) { color: '#FFFFFF', fontSize: 12, fontWeight: '700', + lineHeight: 20, + textAlignVertical: 'center', + includeFontPadding: false, }, }); }