From b68d5f854de9f1b52c395ffd1a5dbab8314beee0 Mon Sep 17 00:00:00 2001 From: John Preston Date: Tue, 15 Dec 2020 19:00:47 +0400 Subject: [PATCH] Fix infinite 'Loading...' when no members in the group. --- Telegram/SourceFiles/boxes/peers/edit_participants_box.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Telegram/SourceFiles/boxes/peers/edit_participants_box.cpp b/Telegram/SourceFiles/boxes/peers/edit_participants_box.cpp index 0d866296f1..3ce97701f1 100644 --- a/Telegram/SourceFiles/boxes/peers/edit_participants_box.cpp +++ b/Telegram/SourceFiles/boxes/peers/edit_participants_box.cpp @@ -1369,9 +1369,12 @@ bool ParticipantsBoxController::feedMegagroupLastParticipants() { return false; } + auto added = false; _additional.fillFromPeer(); for (const auto user : info->lastParticipants) { - appendRow(user); + if (appendRow(user)) { + added = true; + } // // Don't count lastParticipants in _offset, because we don't know @@ -1383,7 +1386,7 @@ bool ParticipantsBoxController::feedMegagroupLastParticipants() { if (_onlineSorter) { _onlineSorter->sort(); } - return true; + return added; } void ParticipantsBoxController::rowClicked(not_null row) {