2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Fix feed messages loading both ways.

This commit is contained in:
John Preston
2018-01-29 20:13:24 +03:00
parent 366ea1edc3
commit 17b913fb13
12 changed files with 82 additions and 29 deletions

View File

@@ -350,10 +350,13 @@ void Filler::addChatActions(not_null<ChatData*> chat) {
void Filler::addChannelActions(not_null<ChannelData*> channel) {
auto isGroup = channel->isMegagroup();
if (!isGroup) {
const auto grouped = (channel->feed() != nullptr);
_addAction(
lang(grouped ? lng_feed_ungroup : lng_feed_group),
[=] { ToggleChannelGrouping(channel, !grouped); });
const auto feed = channel->feed();
const auto grouped = (feed != nullptr);
if (!grouped || feed->channels().size() > 1) {
_addAction(
lang(grouped ? lng_feed_ungroup : lng_feed_group),
[=] { ToggleChannelGrouping(channel, !grouped); });
}
}
if (_source != PeerMenuSource::ChatsList) {
if (ManagePeerBox::Available(channel)) {