diff --git a/Telegram/SourceFiles/window/window_main_menu.cpp b/Telegram/SourceFiles/window/window_main_menu.cpp index d5c2d3fce..c49afd1a9 100644 --- a/Telegram/SourceFiles/window/window_main_menu.cpp +++ b/Telegram/SourceFiles/window/window_main_menu.cpp @@ -117,7 +117,9 @@ not_null AddMyChannelsBox( button->setAcceptBoth(true); const auto myChannelsBox = [=](not_null box) { - box->setTitle(tr::lng_notification_channels()); + box->setTitle(chats + ? tr::lng_notification_groups() + : tr::lng_notification_channels()); const auto st = box->lifetime().make_state( st::defaultUserpicButton); @@ -191,10 +193,16 @@ not_null AddMyChannelsBox( const auto &data = controller->session().data(); if (chats) { + auto ids = std::vector(); data.enumerateGroups([&](not_null peer) { + peer = peer->migrateToOrMe(); const auto c = peer->asChannel(); const auto g = peer->asChat(); + if (ranges::contains(ids, peer->id)) { + return; + } if ((c && c->amCreator()) || (g && g->amCreator())) { + ids.push_back(peer->id); add(peer); } });