Improve channel gifts viewing.

This commit is contained in:
John Preston
2025-01-22 22:12:50 +04:00
parent 27bba8250a
commit 80db076f38
9 changed files with 156 additions and 86 deletions
@@ -1604,6 +1604,20 @@ void GenericCreditsEntryBox(
toggleVisibility(!e.savedToProfile);
return false;
});
} else if (uniqueGift && !uniqueGift->ownerAddress.isEmpty()) {
const auto label = box->addRow(
object_ptr<Ui::FlatLabel>(
box,
tr::lng_gift_in_blockchain(
lt_link,
tr::lng_gift_in_blockchain_link() | Ui::Text::ToLink(),
Ui::Text::WithEntities),
st::creditsBoxAboutDivider));
label->setClickHandlerFilter([=](const auto &...) {
UrlClickHandler::Open(
TonAddressUrl(session, uniqueGift->ownerAddress));
return false;
});
}
if (s) {
const auto user = peer ? peer->asUser() : nullptr;