mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 06:26:18 +00:00
Fix editing price per message.
This commit is contained in:
@@ -255,7 +255,7 @@ void SaveStarsPerMessage(
|
||||
api->clearModifyRequest(key);
|
||||
api->applyUpdates(result);
|
||||
if (!broadcast) {
|
||||
channel->setStarsPerMessage(starsPerMessage);
|
||||
channel->owner().editStarsPerMessage(channel, starsPerMessage);
|
||||
}
|
||||
done(true);
|
||||
}).fail([=](const MTP::Error &error) {
|
||||
@@ -265,7 +265,9 @@ void SaveStarsPerMessage(
|
||||
done(false);
|
||||
} else {
|
||||
if (!broadcast) {
|
||||
channel->setStarsPerMessage(starsPerMessage);
|
||||
channel->owner().editStarsPerMessage(
|
||||
channel,
|
||||
starsPerMessage);
|
||||
}
|
||||
done(true);
|
||||
}
|
||||
@@ -362,7 +364,7 @@ void ShowEditPermissions(
|
||||
|
||||
[[nodiscard]] int CurrentPricePerMessage(ChannelData *monoforumLink) {
|
||||
return monoforumLink
|
||||
? monoforumLink->owner().commonStarsPerMessage(monoforumLink)
|
||||
? monoforumLink->commonStarsPerMessage()
|
||||
: -1;
|
||||
}
|
||||
|
||||
|
@@ -1179,7 +1179,7 @@ void ShowEditPeerPermissionsBox(
|
||||
if (available) {
|
||||
Ui::AddSkip(inner);
|
||||
const auto starsPerMessage = peer->isChannel()
|
||||
? peer->asChannel()->starsPerMessage()
|
||||
? peer->asChannel()->commonStarsPerMessage()
|
||||
: 0;
|
||||
charging = inner->add(object_ptr<Ui::SettingsButton>(
|
||||
inner,
|
||||
|
Reference in New Issue
Block a user