Skip to content

Commit

Permalink
Version 5.1: Fix build on macOS.
Browse files Browse the repository at this point in the history
  • Loading branch information
john-preston committed May 31, 2024
1 parent 72d1b43 commit 3ba1941
Show file tree
Hide file tree
Showing 11 changed files with 3 additions and 23 deletions.
2 changes: 0 additions & 2 deletions Telegram/SourceFiles/boxes/send_credits_box.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 0 additions & 1 deletion Telegram/SourceFiles/boxes/send_files_box.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
1 change: 0 additions & 1 deletion Telegram/SourceFiles/chat_helpers/stickers_list_widget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 });
Expand Down
2 changes: 0 additions & 2 deletions Telegram/SourceFiles/core/phone_click_handler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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>();
Expand Down
6 changes: 0 additions & 6 deletions Telegram/SourceFiles/history/view/history_view_message.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand All @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,6 @@ void WebPage::setupAdditionalData() {
}
} else if (_data->type == WebPageType::Factcheck) {
_additionalData = std::make_unique<AdditionalData>(FactcheckData());
const auto raw = factcheckData();
}
}

Expand Down
2 changes: 1 addition & 1 deletion Telegram/SourceFiles/window/window_peer_menu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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() },
Expand Down

0 comments on commit 3ba1941

Please sign in to comment.