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

Update API scheme, track stars-per-message.

This commit is contained in:
John Preston
2025-02-18 12:54:24 +04:00
parent 2e45d9fc6b
commit 852ab19760
27 changed files with 256 additions and 190 deletions

View File

@@ -1201,7 +1201,8 @@ void Filler::addThemeEdit() {
if (!user || user->isInaccessible()) {
return;
}
if (user->meRequiresPremiumToWrite() && !user->session().premium()) {
if ((user->requiresPremiumToWrite() && !user->session().premium())
|| user->starsPerMessage() > 0) {
return;
}
const auto controller = _controller;
@@ -1709,7 +1710,7 @@ void PeerMenuShareContactBox(
ChooseRecipientArgs{
.session = &navigation->session(),
.callback = std::move(callback),
.premiumRequiredError = WritePremiumRequiredError,
.moneyRestrictionError = WriteMoneyRestrictionError,
}),
[](not_null<PeerListBox*> box) {
box->addButton(tr::lng_cancel(), [=] {
@@ -1924,7 +1925,7 @@ object_ptr<Ui::BoxContent> PrepareChooseRecipientBox(
.session = session,
.callback = std::move(callback),
.filter = filter,
.premiumRequiredError = WritePremiumRequiredError,
.moneyRestrictionError = WriteMoneyRestrictionError,
})
, _selectable(selectable) {
}
@@ -2145,7 +2146,7 @@ QPointer<Ui::BoxContent> ShowForwardMessagesBox(
.callback = [=](Chosen thread) {
_singleChosen.fire_copy(thread);
},
.premiumRequiredError = WritePremiumRequiredError,
.moneyRestrictionError = WriteMoneyRestrictionError,
}) {
}
@@ -2555,7 +2556,7 @@ QPointer<Ui::BoxContent> ShowShareGameBox(
.session = &navigation->session(),
.callback = std::move(chosen),
.filter = std::move(filter),
.premiumRequiredError = WritePremiumRequiredError,
.moneyRestrictionError = WriteMoneyRestrictionError,
}),
std::move(initBox)));
return weak->data();