fixes
This commit is contained in:
@@ -353,7 +353,7 @@ pub fn render(f: &mut Frame, area: Rect, app: &App) {
|
||||
let input_height = (input_lines + 2).min(10).max(3);
|
||||
|
||||
// Проверяем, есть ли закреплённое сообщение
|
||||
let has_pinned = app.td_client.current_pinned_message.is_some();
|
||||
let has_pinned = app.td_client.current_pinned_message().is_some();
|
||||
|
||||
let message_chunks = if has_pinned {
|
||||
Layout::default()
|
||||
@@ -380,7 +380,7 @@ pub fn render(f: &mut Frame, area: Rect, app: &App) {
|
||||
// Chat header с typing status
|
||||
let typing_action = app
|
||||
.td_client
|
||||
.typing_status
|
||||
.typing_status()
|
||||
.as_ref()
|
||||
.map(|(_, action, _)| action.clone());
|
||||
let header_line = if let Some(action) = typing_action {
|
||||
@@ -419,7 +419,7 @@ pub fn render(f: &mut Frame, area: Rect, app: &App) {
|
||||
f.render_widget(header, message_chunks[0]);
|
||||
|
||||
// Pinned bar (если есть закреплённое сообщение)
|
||||
if let Some(pinned_msg) = &app.td_client.current_pinned_message {
|
||||
if let Some(pinned_msg) = &app.td_client.current_pinned_message() {
|
||||
let pinned_preview: String = pinned_msg.content.chars().take(40).collect();
|
||||
let ellipsis = if pinned_msg.content.chars().count() > 40 {
|
||||
"..."
|
||||
@@ -458,7 +458,7 @@ pub fn render(f: &mut Frame, area: Rect, app: &App) {
|
||||
// Номер строки, где начинается выбранное сообщение (для автоскролла)
|
||||
let mut selected_msg_line: Option<usize> = None;
|
||||
|
||||
for msg in &app.td_client.current_chat_messages {
|
||||
for msg in app.td_client.current_chat_messages() {
|
||||
// Проверяем, выбрано ли это сообщение
|
||||
let is_selected = selected_msg_id == Some(msg.id);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user