fixes
This commit is contained in:
@@ -4,7 +4,7 @@ use ratatui::widgets::ListState;
|
||||
use std::collections::HashMap;
|
||||
use tele_tui::app::{App, AppScreen, ChatState};
|
||||
use tele_tui::config::Config;
|
||||
use tele_tui::tdlib::client::AuthState;
|
||||
use tele_tui::tdlib::AuthState;
|
||||
use tele_tui::tdlib::{ChatInfo, MessageInfo};
|
||||
|
||||
/// Builder для создания тестового App
|
||||
@@ -239,7 +239,7 @@ impl TestAppBuilder {
|
||||
|
||||
// Применяем auth state
|
||||
if let Some(auth_state) = self.auth_state {
|
||||
app.td_client.auth_state = auth_state;
|
||||
app.td_client.auth.state = auth_state;
|
||||
}
|
||||
|
||||
// Применяем auth inputs
|
||||
@@ -263,8 +263,8 @@ impl TestAppBuilder {
|
||||
// Применяем сообщения к текущему открытому чату
|
||||
if let Some(chat_id) = self.selected_chat_id {
|
||||
if let Some(messages) = self.messages.get(&chat_id) {
|
||||
app.td_client.current_chat_messages = messages.clone();
|
||||
app.td_client.current_chat_id = Some(chat_id);
|
||||
app.td_client.message_manager.current_chat_messages = messages.clone();
|
||||
app.td_client.set_current_chat_id(Some(chat_id));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -134,7 +134,7 @@ fn snapshot_pinned_message() {
|
||||
.build();
|
||||
|
||||
// Устанавливаем закреплённое сообщение
|
||||
app.td_client.current_pinned_message = Some(pinned_msg);
|
||||
app.td_client.set_current_pinned_message(Some(pinned_msg));
|
||||
|
||||
let buffer = render_to_buffer(80, 24, |f| {
|
||||
tele_tui::ui::messages::render(f, f.area(), &app);
|
||||
|
||||
@@ -7,7 +7,7 @@ use helpers::snapshot_utils::{buffer_to_string, render_to_buffer};
|
||||
use helpers::test_data::create_test_chat;
|
||||
use insta::assert_snapshot;
|
||||
use tele_tui::app::AppScreen;
|
||||
use tele_tui::tdlib::client::AuthState;
|
||||
use tele_tui::tdlib::AuthState;
|
||||
|
||||
#[test]
|
||||
fn snapshot_loading_screen_default() {
|
||||
|
||||
Reference in New Issue
Block a user