diff --git a/Telegram/SourceFiles/boxes/filters/edit_filter_chats_list.cpp b/Telegram/SourceFiles/boxes/filters/edit_filter_chats_list.cpp index 7650c00bf..c425ff364 100644 --- a/Telegram/SourceFiles/boxes/filters/edit_filter_chats_list.cpp +++ b/Telegram/SourceFiles/boxes/filters/edit_filter_chats_list.cpp @@ -357,6 +357,7 @@ void EditFilterChatsListController::prepareViewHook() { delegate()->peerListSetAboveWidget(prepareTypesList()); delegate()->peerListAddSelectedPeers( _peers | ranges::view::transform(&History::peer)); + updateTitle(); } object_ptr EditFilterChatsListController::prepareTypesList() { @@ -419,7 +420,13 @@ auto EditFilterChatsListController::createRow(not_null history) } void EditFilterChatsListController::updateTitle() { - const auto count = delegate()->peerListSelectedRowsCount(); + auto types = 0; + for (const auto flag : kAllTypes) { + if (_selected & flag) { + ++types; + } + } + const auto count = delegate()->peerListSelectedRowsCount() - types; const auto additional = qsl("%1 / %2").arg(count).arg(kMaxExceptions); delegate()->peerListSetAdditionalTitle(rpl::single(additional)); }