mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-07-25 06:54:43 +00:00
Show toast on invite attempt to premium required.
This commit is contained in:
@@ -267,6 +267,10 @@ void AddParticipantsBoxController::subscribeToMigration() {
|
||||
}
|
||||
|
||||
void AddParticipantsBoxController::rowClicked(not_null<PeerListRow*> row) {
|
||||
const auto premiumRequiredError = WritePremiumRequiredError;
|
||||
if (RecipientRow::ShowLockedError(this, row, premiumRequiredError)) {
|
||||
return;
|
||||
}
|
||||
const auto &serverConfig = session().serverConfig();
|
||||
auto count = fullCount();
|
||||
auto limit = _peer && (_peer->isChat() || _peer->isMegagroup())
|
||||
@@ -332,8 +336,10 @@ std::unique_ptr<PeerListRow> AddParticipantsBoxController::createRow(
|
||||
if (user->isSelf()) {
|
||||
return nullptr;
|
||||
}
|
||||
auto result = std::make_unique<PeerListRow>(user);
|
||||
if (isAlreadyIn(user)) {
|
||||
const auto already = isAlreadyIn(user);
|
||||
const auto maybeLockedSt = already ? nullptr : &computeListSt().item;
|
||||
auto result = std::make_unique<RecipientRow>(user, maybeLockedSt);
|
||||
if (already) {
|
||||
result->setDisabledState(PeerListRow::State::DisabledChecked);
|
||||
}
|
||||
return result;
|
||||
@@ -707,6 +713,8 @@ void AddSpecialBoxController::prepare() {
|
||||
loadMoreRows();
|
||||
}
|
||||
delegate()->peerListRefreshRows();
|
||||
|
||||
TrackPremiumRequiredChanges(this, lifetime());
|
||||
}
|
||||
|
||||
void AddSpecialBoxController::prepareChatRows(not_null<ChatData*> chat) {
|
||||
|
||||
Reference in New Issue
Block a user