This commit is contained in:
Mikhail Kilin
2026-01-21 02:27:08 +03:00
parent 9912ac11bd
commit 32ab1df1fa
8 changed files with 291 additions and 79 deletions

View File

@@ -42,6 +42,7 @@ pub fn render(f: &mut Frame, area: Rect, app: &mut App) {
.iter()
.map(|chat| {
let is_selected = app.selected_chat_id == Some(chat.id);
let pin_icon = if chat.is_pinned { "📌 " } else { "" };
let prefix = if is_selected { "" } else { " " };
let username_text = chat.username.as_ref()
@@ -54,7 +55,7 @@ pub fn render(f: &mut Frame, area: Rect, app: &mut App) {
String::new()
};
let content = format!("{}{}{}{}", prefix, chat.title, username_text, unread_badge);
let content = format!("{}{}{}{}{}", prefix, pin_icon, chat.title, username_text, unread_badge);
let style = Style::default().fg(Color::White);
ListItem::new(content).style(style)