add typings in/out

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Mikhail Kilin
2026-01-27 03:59:49 +03:00
parent 46720b3584
commit 4d5625f950
6 changed files with 138 additions and 14 deletions

View File

@@ -47,6 +47,9 @@ pub struct App {
pub forwarding_message_id: Option<i64>,
/// Режим выбора чата для пересылки
pub is_selecting_forward_chat: bool,
// Typing indicator
/// Время последней отправки typing status (для throttling)
pub last_typing_sent: Option<std::time::Instant>,
}
impl App {
@@ -79,6 +82,7 @@ impl App {
replying_to_message_id: None,
forwarding_message_id: None,
is_selecting_forward_chat: false,
last_typing_sent: None,
}
}
@@ -135,9 +139,11 @@ impl App {
self.editing_message_id = None;
self.selected_message_index = None;
self.replying_to_message_id = None;
self.last_typing_sent = None;
// Очищаем данные в TdClient
self.td_client.current_chat_id = None;
self.td_client.current_chat_messages.clear();
self.td_client.typing_status = None;
}
/// Начать выбор сообщения для редактирования (при стрелке вверх в пустом инпуте)