2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Added ability to open currency earn section for owned bots.

This commit is contained in:
23rd
2024-10-27 09:42:03 +03:00
parent 24aaed44b9
commit dbb0a5ad28
3 changed files with 27 additions and 15 deletions

View File

@@ -1950,7 +1950,7 @@ void ActionsFiller::addCurrencyAction(not_null<UserData*> user) {
_wrap,
tr::lng_manage_peer_bot_balance_currency(),
state->balance.value() | rpl::map(rpl::mappers::_1 > 0),
[=] { controller->showSection(Info::BotEarn::Make(user)); },
[=] { controller->showSection(Info::ChannelEarn::Make(user)); },
&st::infoIconBotBalance);
const auto balance = user->session().credits().balanceCurrency(user->id);
if (balance) {