Commit Graph

8 Commits

Author SHA1 Message Date
Mikhail Kilin
c27d027ebf chore: remove dead code and unnecessary allow(dead_code) attributes
Cleaned up warnings by removing unused code:
- Removed unused format_timestamp() function from utils.rs
- Removed unused len() method from LruCache
- Removed unused date field from ForwardInfo struct
- Removed unnecessary #[allow(dead_code)] attributes from:
  * AuthState enum (actually used)
  * ChatInfo struct (actually used)
  * TdClient impl block (actually used)

This reduces code noise and makes real warnings more visible.

Changes:
- 20 lines removed
- 1 line added
- 6 files changed

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-01 02:47:51 +03:00
Mikhail Kilin
5897f6deaa test: add unit tests for utils time formatting (P4.11)
Added 9 unit tests for src/utils.rs to cover time/date formatting logic.

**Tests added**:
-  format_timestamp_with_tz with positive offset (+03:00)
-  format_timestamp_with_tz with negative offset (-05:00)
-  format_timestamp_with_tz with zero offset (UTC)
-  format_timestamp_with_tz midnight wrap (23:00 + 2h = 01:00)
-  format_timestamp_with_tz invalid timezone (fallback to +03:00)
-  get_day - extract day from timestamp
-  get_day_grouping - messages on same day
-  format_datetime - full date and time with MSK
-  parse_timezone_offset via public API

**Coverage**:
- format_timestamp_with_tz() - all edge cases
- parse_timezone_offset() - tested indirectly (private fn)
- get_day() - day calculation and grouping
- format_datetime() - partial coverage

**Result**: 54 unit tests pass (was 45, +9 new)

Related: REFACTORING_ROADMAP.md P4.11

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-01 01:59:47 +03:00
Mikhail Kilin
4deb0fbe00 commit 2026-01-30 15:07:13 +03:00
Mikhail Kilin
051c4a0265 fixes
Some checks failed
CI / Check (pull_request) Has been cancelled
CI / Format (pull_request) Has been cancelled
CI / Clippy (pull_request) Has been cancelled
CI / Build (macos-latest) (pull_request) Has been cancelled
CI / Build (ubuntu-latest) (pull_request) Has been cancelled
CI / Build (windows-latest) (pull_request) Has been cancelled
2026-01-28 01:29:03 +03:00
Mikhail Kilin
356d2d3064 add account profile 2026-01-27 13:41:29 +03:00
Mikhail Kilin
81dc5b9007 add pinned messages 2026-01-27 04:38:29 +03:00
Mikhail Kilin
32ab1df1fa fixes 2026-01-21 02:27:08 +03:00
Mikhail Kilin
b6d9291864 fixes 2026-01-20 01:00:12 +03:00