2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 22:46:10 +00:00

First version of feed section view.

This commit is contained in:
John Preston
2018-01-09 20:08:31 +03:00
parent 50b120bc22
commit 794e31505b
55 changed files with 3608 additions and 331 deletions

View File

@@ -10,6 +10,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "dialogs/dialogs_indexed_list.h"
#include "dialogs/dialogs_layout.h"
#include "dialogs/dialogs_search_from_controllers.h"
#include "history/feed/history_feed_section.h"
#include "styles/style_dialogs.h"
#include "styles/style_chat_helpers.h"
#include "styles/style_window.h"
@@ -1739,8 +1740,8 @@ void DialogsInner::applyFeedDialog(const MTPDdialogFeed &dialog) {
addSavedPeersAfter(feed->chatsListDate());
}
if (dialog.has_read_max_position()) {
const auto position = Data::FeedPosition(dialog.vread_max_position);
feed->setUnreadPosition(position);
feed->setUnreadPosition(
Data::FeedPositionFromMTP(dialog.vread_max_position));
}
}
@@ -2307,8 +2308,7 @@ bool DialogsInner::chooseRow() {
if (const auto history = chosen.key.history()) {
App::main()->choosePeer(history->peer->id, chosen.messageId);
} else if (const auto feed = chosen.key.feed()) {
// #TODO feeds open
// _controller->showSection(HistoryFeed::Memento(feed));
_controller->showSection(HistoryFeed::Memento(feed));
}
if (openSearchResult) {
emit searchResultChosen();