summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Preston <johnprestonmail@gmail.com>2024-05-31 23:03:06 +0400
committerJohn Preston <johnprestonmail@gmail.com>2024-05-31 23:03:06 +0400
commit3ba1941808924dc2af1fe7b031a9a3c26eeb2910 (patch)
treebc09aff36b39d581a65aecb2448e3e5b9b02f21c
parent72d1b43453a4539d95e8b3506e712ce3a6dac4da (diff)
Version 5.1: Fix build on macOS.v5.1.0
-rw-r--r--Telegram/SourceFiles/boxes/send_credits_box.cpp2
-rw-r--r--Telegram/SourceFiles/boxes/send_files_box.cpp1
-rw-r--r--Telegram/SourceFiles/chat_helpers/stickers_list_widget.cpp1
-rw-r--r--Telegram/SourceFiles/core/phone_click_handler.cpp2
-rw-r--r--Telegram/SourceFiles/history/view/controls/history_view_compose_media_edit_manager.cpp4
-rw-r--r--Telegram/SourceFiles/history/view/history_view_bottom_info.cpp3
-rw-r--r--Telegram/SourceFiles/history/view/history_view_message.cpp6
-rw-r--r--Telegram/SourceFiles/history/view/media/history_view_extended_preview.cpp2
-rw-r--r--Telegram/SourceFiles/history/view/media/history_view_photo.cpp2
-rw-r--r--Telegram/SourceFiles/history/view/media/history_view_web_page.cpp1
-rw-r--r--Telegram/SourceFiles/window/window_peer_menu.cpp2
11 files changed, 3 insertions, 23 deletions
diff --git a/Telegram/SourceFiles/boxes/send_credits_box.cpp b/Telegram/SourceFiles/boxes/send_credits_box.cpp
index 2873b4ffec..8820c0c65f 100644
--- a/Telegram/SourceFiles/boxes/send_credits_box.cpp
+++ b/Telegram/SourceFiles/boxes/send_credits_box.cpp
@@ -106,8 +106,6 @@ void SendCreditsBox(
widget->setAttribute(Qt::WA_TransparentForMouseEvents);
}
- const auto asd = box->lifetime().make_state<uint64>();
-
Ui::AddSkip(content);
box->addRow(object_ptr<Ui::CenterWrap<>>(
box,
diff --git a/Telegram/SourceFiles/boxes/send_files_box.cpp b/Telegram/SourceFiles/boxes/send_files_box.cpp
index 112e7543a8..fbaaf561a7 100644
--- a/Telegram/SourceFiles/boxes/send_files_box.cpp
+++ b/Telegram/SourceFiles/boxes/send_files_box.cpp
@@ -627,7 +627,6 @@ void SendFilesBox::addMenuButton() {
const auto top = addTopButton(_st.files.menu);
top->setClickedCallback([=] {
const auto &tabbed = _st.tabbed;
- const auto &icons = tabbed.icons;
_menu = base::make_unique_q<Ui::PopupMenu>(top, tabbed.menu);
const auto position = QCursor::pos();
SendMenu::FillSendMenu(
diff --git a/Telegram/SourceFiles/chat_helpers/stickers_list_widget.cpp b/Telegram/SourceFiles/chat_helpers/stickers_list_widget.cpp
index bb1278fd8e..337658af18 100644
--- a/Telegram/SourceFiles/chat_helpers/stickers_list_widget.cpp
+++ b/Telegram/SourceFiles/chat_helpers/stickers_list_widget.cpp
@@ -2179,7 +2179,6 @@ auto StickersListWidget::collectCustomRecents() -> std::vector<Sticker> {
auto result = std::vector<Sticker>();
result.reserve(_customRecentIds.size());
- const auto owner = &session().data();
for (const auto &descriptor : _customRecentIds) {
if (const auto document = descriptor.document; document->sticker()) {
result.push_back(Sticker{ document });
diff --git a/Telegram/SourceFiles/core/phone_click_handler.cpp b/Telegram/SourceFiles/core/phone_click_handler.cpp
index e510cfa048..fc8d50d01e 100644
--- a/Telegram/SourceFiles/core/phone_click_handler.cpp
+++ b/Telegram/SourceFiles/core/phone_click_handler.cpp
@@ -210,8 +210,6 @@ void ResolvePhoneAction::prepare() {
}();
_above.setMarkedText(_st.itemStyle, { above }, options);
_below.setMarkedText(_st.itemStyle, { below }, options);
- const auto textWidth = _above.maxWidth();
- const auto nameWidth = _below.maxWidth();
const auto textLeft = padding.left()
+ st::groupCallJoinAsPhotoSize
+ padding.left();
diff --git a/Telegram/SourceFiles/history/view/controls/history_view_compose_media_edit_manager.cpp b/Telegram/SourceFiles/history/view/controls/history_view_compose_media_edit_manager.cpp
index dd2fa98937..0f765fe69d 100644
--- a/Telegram/SourceFiles/history/view/controls/history_view_compose_media_edit_manager.cpp
+++ b/Telegram/SourceFiles/history/view/controls/history_view_compose_media_edit_manager.cpp
@@ -129,8 +129,8 @@ SendMenu::Details MediaEditManager::sendMenuDetails(
const auto canMoveCaption = media->allowsEditCaption()
&& hasCaptionText
&& (editPhoto
- || editDocument
- && (editDocument->isVideoFile() || editDocument->isGifv()));
+ || (editDocument
+ && (editDocument->isVideoFile() || editDocument->isGifv())));
return {
.spoiler = (!canSaveSpoiler
? SendMenu::SpoilerState::None
diff --git a/Telegram/SourceFiles/history/view/history_view_bottom_info.cpp b/Telegram/SourceFiles/history/view/history_view_bottom_info.cpp
index 8af94c73bc..42ea80dce4 100644
--- a/Telegram/SourceFiles/history/view/history_view_bottom_info.cpp
+++ b/Telegram/SourceFiles/history/view/history_view_bottom_info.cpp
@@ -191,9 +191,6 @@ ClickHandlerPtr BottomInfo::replayEffectLink(
ClickHandlerPtr BottomInfo::replayEffectLink(
not_null<const Message*> view) const {
- const auto item = view->data();
- const auto itemId = item->fullId();
- const auto sessionId = item->history()->session().uniqueId();
const auto weak = base::make_weak(view);
return std::make_shared<LambdaClickHandler>([=](ClickContext context) {
const auto my = context.other.value<ClickHandlerContext>();
diff --git a/Telegram/SourceFiles/history/view/history_view_message.cpp b/Telegram/SourceFiles/history/view/history_view_message.cpp
index 38b89f061f..e8876c6e83 100644
--- a/Telegram/SourceFiles/history/view/history_view_message.cpp
+++ b/Telegram/SourceFiles/history/view/history_view_message.cpp
@@ -585,13 +585,7 @@ void Message::animateReaction(Ui::ReactionFlyAnimationArgs &&args) {
}
if (bubble) {
- const auto check = factcheckBlock();
- const auto entry = logEntryOriginal();
-
// Entry page is always a bubble bottom.
- auto mediaOnBottom = (mediaDisplayed && media->isBubbleBottom()) || check || (entry/* && entry->isBubbleBottom()*/);
- auto mediaOnTop = (mediaDisplayed && media->isBubbleTop()) || (entry && entry->isBubbleTop());
-
auto inner = g;
if (_comments) {
inner.setHeight(inner.height() - st::historyCommentsButtonHeight);
diff --git a/Telegram/SourceFiles/history/view/media/history_view_extended_preview.cpp b/Telegram/SourceFiles/history/view/media/history_view_extended_preview.cpp
index 60db55c8ce..88c405d2eb 100644
--- a/Telegram/SourceFiles/history/view/media/history_view_extended_preview.cpp
+++ b/Telegram/SourceFiles/history/view/media/history_view_extended_preview.cpp
@@ -174,10 +174,8 @@ int ExtendedPreview::minWidthForButton() const {
void ExtendedPreview::draw(Painter &p, const PaintContext &context) const {
if (width() < st::msgPadding.left() + st::msgPadding.right() + 1) return;
- const auto stm = context.messageStyle();
auto paintx = 0, painty = 0, paintw = width(), painth = height();
auto bubble = _parent->hasBubble();
- auto captionw = paintw - st::msgPadding.left() - st::msgPadding.right();
auto rthumb = style::rtlrect(paintx, painty, paintw, painth, width());
const auto inWebPage = (_parent->media() != this);
const auto rounding = inWebPage
diff --git a/Telegram/SourceFiles/history/view/media/history_view_photo.cpp b/Telegram/SourceFiles/history/view/media/history_view_photo.cpp
index e5c7877fa7..c9721746ac 100644
--- a/Telegram/SourceFiles/history/view/media/history_view_photo.cpp
+++ b/Telegram/SourceFiles/history/view/media/history_view_photo.cpp
@@ -271,7 +271,6 @@ void Photo::draw(Painter &p, const PaintContext &context) const {
_dataMedia->automaticLoad(_realParent->fullId(), _parent->data());
const auto st = context.st;
const auto sti = context.imageStyle();
- const auto stm = context.messageStyle();
auto loaded = _dataMedia->loaded();
auto displayLoading = _data->displayLoading();
@@ -286,7 +285,6 @@ void Photo::draw(Painter &p, const PaintContext &context) const {
}
}
const auto radial = isRadialAnimation();
- const auto botTop = _parent->Get<FakeBotAboutTop>();
auto rthumb = style::rtlrect(paintx, painty, paintw, painth, width());
if (_serviceWidth > 0) {
diff --git a/Telegram/SourceFiles/history/view/media/history_view_web_page.cpp b/Telegram/SourceFiles/history/view/media/history_view_web_page.cpp
index 44863dd41f..31e79f46f1 100644
--- a/Telegram/SourceFiles/history/view/media/history_view_web_page.cpp
+++ b/Telegram/SourceFiles/history/view/media/history_view_web_page.cpp
@@ -324,7 +324,6 @@ void WebPage::setupAdditionalData() {
}
} else if (_data->type == WebPageType::Factcheck) {
_additionalData = std::make_unique<AdditionalData>(FactcheckData());
- const auto raw = factcheckData();
}
}
diff --git a/Telegram/SourceFiles/window/window_peer_menu.cpp b/Telegram/SourceFiles/window/window_peer_menu.cpp
index b1a37190f2..d3aecb1c5e 100644
--- a/Telegram/SourceFiles/window/window_peer_menu.cpp
+++ b/Telegram/SourceFiles/window/window_peer_menu.cpp
@@ -2098,7 +2098,7 @@ QPointer<Ui::BoxContent> ShowForwardMessagesBox(
}
state->menu->setForcedVerticalOrigin(
Ui::PopupMenu::VerticalOrigin::Bottom);
- const auto result = SendMenu::FillSendMenu(
+ SendMenu::FillSendMenu(
state->menu.get(),
show,
SendMenu::Details{ sendMenuType() },