From e2205c7251de2f54d62079edef5b7041d4a04008 Mon Sep 17 00:00:00 2001 From: 23rd <23rd@vivaldi.net> Date: Mon, 5 Dec 2022 16:21:46 +0300 Subject: [PATCH] Fixed build on macOS. --- Telegram/SourceFiles/dialogs/dialogs_row.cpp | 1 - .../SourceFiles/history/view/media/history_view_location.cpp | 4 ++-- .../SourceFiles/platform/mac/notifications_manager_mac.mm | 2 +- .../platform/mac/touchbar/items/mac_pinned_chats_item.mm | 4 ++-- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/Telegram/SourceFiles/dialogs/dialogs_row.cpp b/Telegram/SourceFiles/dialogs/dialogs_row.cpp index 376ca14fe3..0e175c42af 100644 --- a/Telegram/SourceFiles/dialogs/dialogs_row.cpp +++ b/Telegram/SourceFiles/dialogs/dialogs_row.cpp @@ -45,7 +45,6 @@ void PaintCornerBadgeTTLFrame( if (!ttl) { return; } - using Radius = ImageRoundRadius; constexpr auto kBlurRadius = 24; PainterHighQualityEnabler hq(q); diff --git a/Telegram/SourceFiles/history/view/media/history_view_location.cpp b/Telegram/SourceFiles/history/view/media/history_view_location.cpp index f8890ed1bd..f111b4ae02 100644 --- a/Telegram/SourceFiles/history/view/media/history_view_location.cpp +++ b/Telegram/SourceFiles/history/view/media/history_view_location.cpp @@ -248,8 +248,8 @@ void Location::validateImageCache( Expects(_media != nullptr); const auto ratio = style::DevicePixelRatio(); - if (_imageCache.size() == (outer * ratio) - && _imageCacheRounding == rounding + if ((_imageCache.size() == (outer * ratio) + && _imageCacheRounding == rounding) || _media->isNull()) { return; } diff --git a/Telegram/SourceFiles/platform/mac/notifications_manager_mac.mm b/Telegram/SourceFiles/platform/mac/notifications_manager_mac.mm index 1ab0de030e..5905a8c726 100644 --- a/Telegram/SourceFiles/platform/mac/notifications_manager_mac.mm +++ b/Telegram/SourceFiles/platform/mac/notifications_manager_mac.mm @@ -19,7 +19,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "ui/empty_userpic.h" #include "main/main_session.h" #include "mainwindow.h" -#include "window/notification_utilities.h" +#include "window/notifications_utilities.h" #include "styles/style_window.h" #include diff --git a/Telegram/SourceFiles/platform/mac/touchbar/items/mac_pinned_chats_item.mm b/Telegram/SourceFiles/platform/mac/touchbar/items/mac_pinned_chats_item.mm index 916bf4f2f9..0fd0f0c4d7 100644 --- a/Telegram/SourceFiles/platform/mac/touchbar/items/mac_pinned_chats_item.mm +++ b/Telegram/SourceFiles/platform/mac/touchbar/items/mac_pinned_chats_item.mm @@ -28,6 +28,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "styles/style_dialogs.h" #include "ui/effects/animations.h" #include "ui/empty_userpic.h" +#include "ui/userpic_view.h" #include "ui/painter.h" #include "window/window_controller.h" #include "window/window_session_controller.h" @@ -84,7 +85,6 @@ QImage ArchiveUserpic(not_null folder) { auto result = PrepareImage(); Painter paint(&result); - auto view = Ui::PeerUserpicView(); folder->paintUserpic(paint, 0, 0, result.width()); return result; } @@ -549,7 +549,7 @@ TimeId CalculateOnlineTill(not_null peer) { ) | rpl::start_with_next([=] { const auto all = ranges::all_of(_pins, [=](const auto &pin) { return (!pin->peer->hasUserpic()) - || (pin->userpicView && pin->userpicView->image()); + || (!Ui::PeerUserpicLoading(pin->userpicView)); }); if (all) { downloadLifetime->destroy();