Show build version in app header
All checks were successful
Release App / release-app (push) Successful in 1m12s

This commit is contained in:
2026-04-24 14:47:01 +03:00
parent c39071b61a
commit 94fc240086
4 changed files with 33 additions and 3 deletions

View File

@@ -9,6 +9,7 @@
#include <curses.h>
#include "build_config.h"
#include "util.h"
namespace telegram_tui {
@@ -242,7 +243,7 @@ void App::send_tdlib_parameters() {
{"system_language_code", "en"},
{"device_model", "shinoa"},
{"system_version", "Linux"},
{"application_version", "0.1.0"},
{"application_version", TELEGRAM_TUI_BUILD_VERSION},
{"enable_storage_optimizer", true},
{"ignore_file_names", false},
});

View File

@@ -6,6 +6,7 @@
#include <curses.h>
#include "app_ui.h"
#include "build_config.h"
#include "util.h"
namespace telegram_tui {
@@ -88,7 +89,10 @@ void App::draw() {
attron(A_REVERSE);
mvhline(header_y, 0, ' ', width);
const std::string header_label = use_test_dc_ ? "shinoa [TEST DC]" : "shinoa";
std::string header_label = std::string("shinoa ") + TELEGRAM_TUI_BUILD_VERSION;
if (use_test_dc_) {
header_label += " [TEST DC]";
}
mvprintw(header_y, 1, "%s", header_label.c_str());
const std::string auth_label = authorized_ ? "ready" : current_auth_label();
const int auth_x = std::max(1, width - static_cast<int>(auth_label.size()) - 2);

View File

@@ -1,4 +1,5 @@
#pragma once
#define TELEGRAM_TUI_BUILD_VERSION "@TELEGRAM_TUI_BUILD_VERSION@"
#define TELEGRAM_TUI_BUILD_API_ID "@TELEGRAM_TUI_BUILD_API_ID@"
#define TELEGRAM_TUI_BUILD_API_HASH "@TELEGRAM_TUI_BUILD_API_HASH@"