2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 22:55:11 +00:00

Remove history_item and layout from pch.

Also move some code to separate modules.
Also create history item views by Window::Controller.
This commit is contained in:
John Preston
2018-01-11 22:33:26 +03:00
parent 4740d44159
commit bee474f6e9
78 changed files with 794 additions and 525 deletions

View File

@@ -22,6 +22,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "media/media_audio.h"
#include "media/player/media_player_instance.h"
#include "storage/localstorage.h"
#include "history/history_item.h"
#include "history/history_media_types.h"
#include "history/history_item_components.h"
#include "ui/effects/round_checkbox.h"
@@ -114,6 +115,11 @@ void Checkbox::startAnimation() {
_pression.start(_updateCallback, showPressed ? 0. : 1., showPressed ? 1. : 0., st::overviewCheck.duration);
}
MsgId AbstractItem::msgId() const {
auto item = getItem();
return item ? item->id : 0;
}
ItemBase::ItemBase(not_null<HistoryItem*> parent) : _parent(parent) {
}

View File

@@ -12,6 +12,9 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "ui/effects/radial_animation.h"
#include "styles/style_overview.h"
struct HistoryTextState;
struct HistoryStateRequest;
namespace style {
struct RoundCheckbox;
} // namespace style
@@ -47,10 +50,7 @@ public:
virtual DocumentData *getDocument() const {
return nullptr;
}
MsgId msgId() const {
auto item = getItem();
return item ? item->id : 0;
}
MsgId msgId() const;
virtual void invalidateCache() {
}