Skip to content

Refine update helpers and zip handling - #3

Open
HorGonAI wants to merge 1 commit into
horgonai/add-update-functionality-to-telegram-bot-20ktorfrom
horgonai/refactor-and-optimize-codebase
Open

Refine update helpers and zip handling#3
HorGonAI wants to merge 1 commit into
horgonai/add-update-functionality-to-telegram-bot-20ktorfrom
horgonai/refactor-and-optimize-codebase

Conversation

@HorGonAI

@HorGonAI HorGonAI commented Feb 2, 2026

Copy link
Copy Markdown
Owner

Motivation

  • Reduce duplicated logic for detecting .zip assets and simplify progress rendering.
  • Avoid unnecessary conversions when handling downloaded Telegram files.

Description

  • Removed unused include #include <optional>.
  • Added a reusable has_zip_extension helper to centralize .zip checks.
  • Simplified render_progress by using a constexpr kBars constant for the progress bar.
  • Changed download_telegram_file to return fs::path instead of std::string to avoid extra conversions and updated callers accordingly.
  • Replaced manual ".zip" suffix checks in GitHub asset selection and Telegram upload handling with has_zip_extension.

Testing

  • No automated tests were run for this change.

Codex Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant