2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-05 08:55:59 +00:00

Send paid stickers/gifs/inline-results.

This commit is contained in:
John Preston
2025-02-20 17:49:50 +04:00
parent 22b99b6d3e
commit 93a590774e
19 changed files with 161 additions and 95 deletions

View File

@@ -1684,12 +1684,12 @@ void PeerMenuShareContactBox(
: ('\xAB' + title + '\xBB');
struct State {
base::weak_ptr<Data::Thread> weak;
Fn<void(Api::SendOptions)> share;
FnMut<void(Api::SendOptions)> share;
SendPaymentHelper sendPayment;
};
const auto state = std::make_shared<State>();
auto state = std::make_shared<State>();
state->weak = thread;
state->share = [=](Api::SendOptions options) {
state->share = [=](Api::SendOptions options) mutable {
const auto strong = state->weak.get();
if (!strong) {
return;
@@ -1715,6 +1715,7 @@ void PeerMenuShareContactBox(
auto action = Api::SendAction(strong, options);
action.clearDraft = false;
strong->session().api().shareContact(user, action);
state = nullptr;
};
navigation->parentController()->show(