Skip to content

Commit

Permalink
Fix admins list restore in group profile.
Browse files Browse the repository at this point in the history
  • Loading branch information
john-preston committed Jul 21, 2023
1 parent e731269 commit fd3169f
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions Telegram/SourceFiles/boxes/peers/edit_participants_box.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1165,15 +1165,19 @@ void ParticipantsBoxController::restoreState(
if (my->wasLoading) {
loadMoreRows();
}
const auto was = _fullCountValue.current();
PeerListController::restoreState(std::move(state));
const auto count = delegate()->peerListFullRowsCount();
if (count > 0 || _allLoaded) {
const auto now = delegate()->peerListFullRowsCount();
if (now > 0 || _allLoaded) {
refreshDescription();
if (_stories) {
for (auto i = 0; i != count; ++i) {
for (auto i = 0; i != now; ++i) {
_stories->process(delegate()->peerListRowAt(i));
}
}
if (now != was) {
refreshRows();
}
}
if (_onlineSorter) {
_onlineSorter->sort();
Expand Down

0 comments on commit fd3169f

Please sign in to comment.