diff --git a/Telegram/SourceFiles/history/view/history_view_group_call_bar.cpp b/Telegram/SourceFiles/history/view/history_view_group_call_bar.cpp index 0e5176c12..bce9881b4 100644 --- a/Telegram/SourceFiles/history/view/history_view_group_call_bar.cpp +++ b/Telegram/SourceFiles/history/view/history_view_group_call_bar.cpp @@ -70,8 +70,10 @@ rpl::producer GroupCallBarContentByCall( std::vector userpics; Ui::GroupCallBarContent current; base::has_weak_ptr guard; + uint64 ownerId = 0; bool someUserpicsNotLoaded = false; bool pushScheduled = false; + bool noUserpics = false; }; // speaking DESC, std::max(date, lastActive) DESC @@ -244,6 +246,8 @@ rpl::producer GroupCallBarContentByCall( return [=](auto consumer) { auto lifetime = rpl::lifetime(); auto state = lifetime.make_state(); + state->noUserpics = call->listenersHidden(); + state->ownerId = call->peer()->id.value; state->current.shown = true; state->current.livestream = call->peer()->isBroadcast(); @@ -254,7 +258,18 @@ rpl::producer GroupCallBarContentByCall( state->pushScheduled = true; crl::on_main(&state->guard, [=] { state->pushScheduled = false; - consumer.put_next_copy(state->current); + auto copy = state->current; + if (state->noUserpics && copy.count > 0) { + const auto i = ranges::find( + copy.users, + state->ownerId, + &Ui::GroupCallUser::id); + if (i != end(copy.users)) { + copy.users.erase(i); + --copy.count; + } + } + consumer.put_next(std::move(copy)); }); };