From b7aa60bedf2cbf2d574d0de193d241c99cd297bc Mon Sep 17 00:00:00 2001 From: John Preston Date: Fri, 29 May 2020 22:06:40 +0400 Subject: [PATCH] Fix build for Linux. --- Telegram/SourceFiles/boxes/filters/edit_filter_box.cpp | 2 +- Telegram/SourceFiles/data/data_cloud_file.cpp | 4 +--- Telegram/SourceFiles/data/data_photo.h | 3 +-- .../platform/linux/notifications_manager_linux.cpp | 5 +++-- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/Telegram/SourceFiles/boxes/filters/edit_filter_box.cpp b/Telegram/SourceFiles/boxes/filters/edit_filter_box.cpp index a20607aa3..d1fb8251e 100644 --- a/Telegram/SourceFiles/boxes/filters/edit_filter_box.cpp +++ b/Telegram/SourceFiles/boxes/filters/edit_filter_box.cpp @@ -185,7 +185,7 @@ void FilterChatsPreview::updateData( } } for (const auto history : peers) { - _removePeer.push_back({ + _removePeer.push_back(PeerButton{ .history = history, .button = makeButton([=] { removePeer(history); }) }); diff --git a/Telegram/SourceFiles/data/data_cloud_file.cpp b/Telegram/SourceFiles/data/data_cloud_file.cpp index 7dcf88c8b..258b71d50 100644 --- a/Telegram/SourceFiles/data/data_cloud_file.cpp +++ b/Telegram/SourceFiles/data/data_cloud_file.cpp @@ -14,8 +14,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "ui/image/image.h" #include "main/main_session.h" -#include - namespace Data { void CloudImageView::set( @@ -314,4 +312,4 @@ void LoadCloudFile( std::move(progress)); } -} // namespace Data \ No newline at end of file +} // namespace Data diff --git a/Telegram/SourceFiles/data/data_photo.h b/Telegram/SourceFiles/data/data_photo.h index 6c57bbed8..25cf6755c 100644 --- a/Telegram/SourceFiles/data/data_photo.h +++ b/Telegram/SourceFiles/data/data_photo.h @@ -29,8 +29,7 @@ enum class PhotoSize : uchar { }; [[nodiscard]] inline int PhotoSizeIndex(PhotoSize size) { - Expects(static_cast(size) >= 0 - && static_cast(size) < kPhotoSizeCount); + Expects(static_cast(size) < kPhotoSizeCount); return static_cast(size); } diff --git a/Telegram/SourceFiles/platform/linux/notifications_manager_linux.cpp b/Telegram/SourceFiles/platform/linux/notifications_manager_linux.cpp index bbee8c3b2..1fa303f2c 100644 --- a/Telegram/SourceFiles/platform/linux/notifications_manager_linux.cpp +++ b/Telegram/SourceFiles/platform/linux/notifications_manager_linux.cpp @@ -1,3 +1,4 @@ + /* This file is part of Telegram Desktop, the official desktop application for the Telegram messaging service. @@ -533,8 +534,8 @@ void Manager::Private::showNotification( hideReplyButton); if (!hideNameAndPhoto) { - const auto key = peer->userpicUniqueKey(); - notification->setImage(_cachedUserpics.get(key, peer)); + const auto key = peer->userpicUniqueKey(userpicView); + notification->setImage(_cachedUserpics.get(key, peer, userpicView)); } auto i = _notifications.find(peer->id);