From 1858e7e8ac19487514f5c3678a8bfbb380ab8f3e Mon Sep 17 00:00:00 2001 From: John Preston Date: Thu, 3 Jun 2021 16:57:28 +0400 Subject: [PATCH] Fix many video tiles in voice chats. --- .../calls/group/calls_group_viewport_opengl.cpp | 10 ++++------ Telegram/lib_ui | 2 +- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/Telegram/SourceFiles/calls/group/calls_group_viewport_opengl.cpp b/Telegram/SourceFiles/calls/group/calls_group_viewport_opengl.cpp index f730d18ab..2e79cf933 100644 --- a/Telegram/SourceFiles/calls/group/calls_group_viewport_opengl.cpp +++ b/Telegram/SourceFiles/calls/group/calls_group_viewport_opengl.cpp @@ -319,6 +319,7 @@ void Viewport::RendererGL::paint( auto index = 0; for (const auto &tile : _owner->_tiles) { if (!tile->shown()) { + index++; continue; } paintTile( @@ -970,14 +971,8 @@ void Viewport::RendererGL::validateDatas() { return std::clamp(row->name().maxWidth(), 1, hasWidth) * factor; }; for (auto i = 0; i != count; ++i) { - if (!tiles[i]->shown()) { - continue; - } tiles[i]->row()->lazyInitialize(st::groupCallMembersListItem); const auto width = nameWidth(i); - if (width <= 0) { - continue; - } if (width > available) { available = width; } @@ -1079,6 +1074,9 @@ void Viewport::RendererGL::validateDatas() { const auto i = request.index; const auto index = _tileDataIndices[i]; const auto &data = _tileData[_tileDataIndices[i]]; + if (data.nameRect.isEmpty()) { + continue; + } const auto row = tiles[i]->row(); if (request.updating) { p.setCompositionMode(QPainter::CompositionMode_Source); diff --git a/Telegram/lib_ui b/Telegram/lib_ui index 0df1579d4..45c476da3 160000 --- a/Telegram/lib_ui +++ b/Telegram/lib_ui @@ -1 +1 @@ -Subproject commit 0df1579d4a2fe7b18419e5025db380250c86cc53 +Subproject commit 45c476da3a700a68e4890f06504c7f2c09608ba9