fixes
Some checks are pending
CI / Check (pull_request) Waiting to run
CI / Format (pull_request) Waiting to run
CI / Clippy (pull_request) Waiting to run
CI / Build (macos-latest) (pull_request) Waiting to run
CI / Build (ubuntu-latest) (pull_request) Waiting to run
CI / Build (windows-latest) (pull_request) Waiting to run

This commit is contained in:
Mikhail Kilin
2026-01-28 01:29:03 +03:00
parent f291191577
commit 051c4a0265
29 changed files with 2189 additions and 45 deletions

View File

@@ -6,7 +6,7 @@ use ratatui::{
Frame,
};
use crate::app::App;
use crate::utils::{format_timestamp, format_date, get_day};
use crate::utils::{format_timestamp_with_tz, format_date, get_day};
use tdlib_rs::enums::TextEntityType;
use tdlib_rs::types::TextEntity;
@@ -510,16 +510,16 @@ pub fn render(f: &mut Frame, area: Rect, app: &App) {
last_sender = Some(current_sender);
}
// Форматируем время (HH:MM)
let time = format_timestamp(msg.date);
// Форматируем время (HH:MM) с учётом timezone из config
let time = format_timestamp_with_tz(msg.date, &app.config.general.timezone);
// Цвет сообщения (жёлтый если выбрано)
// Цвет сообщения (из config или жёлтый если выбрано)
let msg_color = if is_selected {
Color::Yellow
app.config.parse_color(&app.config.colors.selected_message)
} else if msg.is_outgoing {
Color::Green
app.config.parse_color(&app.config.colors.outgoing_message)
} else {
Color::White
app.config.parse_color(&app.config.colors.incoming_message)
};
// Маркер выбора
@@ -694,9 +694,9 @@ pub fn render(f: &mut Frame, area: Rect, app: &App) {
};
let style = if reaction.is_chosen {
Style::default().fg(Color::Yellow)
Style::default().fg(app.config.parse_color(&app.config.colors.reaction_chosen))
} else {
Style::default().fg(Color::Gray)
Style::default().fg(app.config.parse_color(&app.config.colors.reaction_other))
};
reaction_spans.push(Span::styled(reaction_text, style));