2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 14:45: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

@@ -439,14 +439,16 @@ void AddBotToGroupBoxController::addBotToGroup(not_null<PeerData*> chat) {
LayerOption::KeepOther);
}
std::unique_ptr<ChatsListBoxController::Row> AddBotToGroupBoxController::createRow(not_null<History*> history) {
auto AddBotToGroupBoxController::createRow(not_null<History*> history)
-> std::unique_ptr<ChatsListBoxController::Row> {
if (!needToCreateRow(history->peer)) {
return nullptr;
}
return std::make_unique<Row>(history);
}
bool AddBotToGroupBoxController::needToCreateRow(not_null<PeerData*> peer) const {
bool AddBotToGroupBoxController::needToCreateRow(
not_null<PeerData*> peer) const {
if (sharingBotGame()) {
if (!peer->canWrite()
|| peer->amRestricted(ChatRestriction::f_send_games)) {