2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 06:35:14 +00:00

Use different phrases for default restrictions.

This commit is contained in:
John Preston
2019-01-14 21:43:06 +04:00
parent 4f33be20d4
commit 22f1ffc72b
16 changed files with 359 additions and 171 deletions

View File

@@ -81,9 +81,12 @@ void Inner::visibleTopBottomUpdated(
void Inner::checkRestrictedPeer() {
if (_inlineQueryPeer) {
if (_inlineQueryPeer->amRestricted(ChatRestriction::f_send_inline)) {
const auto errorKey = Data::RestrictionErrorKey(
_inlineQueryPeer,
ChatRestriction::f_send_inline);
if (errorKey) {
if (!_restrictedLabel) {
_restrictedLabel.create(this, lang(lng_restricted_send_inline), Ui::FlatLabel::InitType::Simple, st::stickersRestrictedLabel);
_restrictedLabel.create(this, lang(*errorKey), Ui::FlatLabel::InitType::Simple, st::stickersRestrictedLabel);
_restrictedLabel->show();
_restrictedLabel->move(st::inlineResultsLeft - st::buttonRadius, st::stickerPanPadding);
if (_switchPmButton) {