Fix admins list restore in group profile.

This commit is contained in:
John Preston 2023-07-21 19:17:14 +04:00
parent e7312697bf
commit fd3169f82d
1 changed files with 7 additions and 3 deletions

View File

@ -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();