mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 06:35:14 +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:
@@ -20,6 +20,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
#include "styles/style_window.h"
|
||||
#include "storage/file_download.h"
|
||||
#include "auth_session.h"
|
||||
#include "history/history_item.h"
|
||||
#include "platform/platform_specific.h"
|
||||
|
||||
namespace Window {
|
||||
@@ -63,6 +64,16 @@ Manager::Manager(System *system) : Notifications::Manager(system) {
|
||||
_inputCheckTimer.setTimeoutHandler([this] { checkLastInput(); });
|
||||
}
|
||||
|
||||
Manager::QueuedNotification::QueuedNotification(
|
||||
not_null<HistoryItem*> item
|
||||
, int forwardedCount)
|
||||
: history(item->history())
|
||||
, peer(history->peer)
|
||||
, author((!peer->isUser() && !item->isPost()) ? item->author() : nullptr)
|
||||
, item((forwardedCount < 2) ? item.get() : nullptr)
|
||||
, forwardedCount(forwardedCount) {
|
||||
}
|
||||
|
||||
QPixmap Manager::hiddenUserpicPlaceholder() const {
|
||||
if (_hiddenUserpicPlaceholder.isNull()) {
|
||||
_hiddenUserpicPlaceholder = App::pixmapFromImageInPlace(Messenger::Instance().logoNoMargin().scaled(st::notifyPhotoSize, st::notifyPhotoSize, Qt::IgnoreAspectRatio, Qt::SmoothTransformation));
|
||||
|
Reference in New Issue
Block a user