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

Move draw / getState code to HistoryView::Message.

Item dimensions broken for now.
Also remove history.h from pch.
This commit is contained in:
John Preston
2018-01-13 15:45:11 +03:00
parent bee474f6e9
commit 97a9089ebf
95 changed files with 3215 additions and 2768 deletions

View File

@@ -11,6 +11,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "dialogs/dialogs_layout.h"
#include "dialogs/dialogs_search_from_controllers.h"
#include "history/feed/history_feed_section.h"
#include "history/history.h"
#include "history/history_item.h"
#include "styles/style_dialogs.h"
#include "styles/style_chat_helpers.h"
@@ -323,7 +324,7 @@ void DialogsInner::paintRegion(Painter &p, const QRegion &region, bool paintingO
const auto row = _filterResults[from];
const auto key = row->key();
const auto history = key.history();
const auto peer = history ? history->peer : nullptr;
const auto peer = history ? history->peer.get() : nullptr;
const auto active = !activeMsgId
&& peer
&& activePeer
@@ -1356,6 +1357,12 @@ void DialogsInner::updateSelectedRow(Dialogs::Key key) {
}
}
Dialogs::IndexedList *DialogsInner::shownDialogs() const {
return (Global::DialogsMode() == Dialogs::Mode::Important)
? _dialogsImportant.get()
: _dialogs.get();
}
void DialogsInner::leaveEventHook(QEvent *e) {
setMouseTracking(false);
clearSelection();