Version 5.1: Fix build on macOS.

This commit is contained in:
John Preston 2024-05-31 23:03:06 +04:00
parent 72d1b43453
commit 3ba1941808
11 changed files with 3 additions and 23 deletions

View file

@ -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,

View file

@ -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(

View file

@ -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 });

View file

@ -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();

View file

@ -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

View file

@ -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>();

View file

@ -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);

View file

@ -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

View file

@ -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) {

View file

@ -324,7 +324,6 @@ void WebPage::setupAdditionalData() {
}
} else if (_data->type == WebPageType::Factcheck) {
_additionalData = std::make_unique<AdditionalData>(FactcheckData());
const auto raw = factcheckData();
}
}

View file

@ -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() },