diff --git a/Telegram/SourceFiles/boxes/peers/edit_peer_color_box.cpp b/Telegram/SourceFiles/boxes/peers/edit_peer_color_box.cpp index d5d0762214..1eede85e30 100644 --- a/Telegram/SourceFiles/boxes/peers/edit_peer_color_box.cpp +++ b/Telegram/SourceFiles/boxes/peers/edit_peer_color_box.cpp @@ -376,12 +376,9 @@ void PreviewWrap::paintEvent(QPaintEvent *e) { _element->draw(p, context); if (_element->displayFromPhoto()) { - auto userpicMinBottomSkip = st::historyPaddingBottom - + st::msgMargin.bottom(); auto userpicBottom = height() - _element->marginBottom() - _element->marginTop(); - const auto item = _element->data(); const auto userpicTop = userpicBottom - st::msgPhotoSize; _peer->paintUserpicLeft( p, @@ -631,15 +628,12 @@ int ColorSelector::resizeGetHeight(int newWidth) { } const auto count = int(_samples.size()); const auto columns = Ui::kSimpleColorIndexCount; - const auto rows = (count + columns - 1) / columns; const auto skip = st::settingsColorRadioSkip; const auto size = (newWidth - skip * (columns - 1)) / float64(columns); const auto isize = int(base::SafeRound(size)); auto top = 0; auto left = 0.; for (auto i = 0; i != count; ++i) { - const auto row = i / columns; - const auto column = i % columns; _samples[i]->resize(isize, isize); _samples[i]->move(int(base::SafeRound(left)), top); left += size + skip; diff --git a/Telegram/SourceFiles/history/history_item.cpp b/Telegram/SourceFiles/history/history_item.cpp index bc2b4b5031..6cf62353c7 100644 --- a/Telegram/SourceFiles/history/history_item.cpp +++ b/Telegram/SourceFiles/history/history_item.cpp @@ -4474,8 +4474,6 @@ void HistoryItem::setServiceMessageByAction(const MTPmessageAction &action) { auto prepareGiftCode = [&](const MTPDmessageActionGiftCode &action) { auto result = PreparedServiceText(); _history->session().giftBoxStickersPacks().load(); - const auto months = action.vmonths().v; - result.text = { (action.is_unclaimed() ? tr::lng_prize_unclaimed_about diff --git a/Telegram/SourceFiles/history/view/controls/history_view_compose_controls.cpp b/Telegram/SourceFiles/history/view/controls/history_view_compose_controls.cpp index a54b671921..09eb7e76c3 100644 --- a/Telegram/SourceFiles/history/view/controls/history_view_compose_controls.cpp +++ b/Telegram/SourceFiles/history/view/controls/history_view_compose_controls.cpp @@ -103,22 +103,6 @@ using SetHistoryArgs = ComposeControls::SetHistoryArgs; using VoiceRecordBar = Controls::VoiceRecordBar; using ForwardPanel = Controls::ForwardPanel; -[[nodiscard]] auto ShowWebPagePreview(WebPageData *page) { - return page && !page->failed; -} - -WebPageText ProcessWebPageData(WebPageData *page) { - auto previewText = HistoryView::TitleAndDescriptionFromWebPage(page); - if (previewText.title.isEmpty()) { - if (page->document) { - previewText.title = tr::lng_attach_file(tr::now); - } else if (page->photo) { - previewText.title = tr::lng_attach_photo(tr::now); - } - } - return previewText; -} - } // namespace class FieldHeader final : public Ui::RpWidget { @@ -428,17 +412,6 @@ void FieldHeader::setShownMessage(HistoryItem *item) { _shownMessage = item; if (item) { updateShownMessageText(); - //if (item->fullId() == _editMsgId.current()) { - // _preview = {}; - // if (const auto media = item->media()) { - // if (const auto page = media->webpage()) { - // const auto preview = ProcessWebPageData(page); - // _title = preview.title; - // _description = preview.description; - // _preview.data = page; - // } - // } - //} } else { _shownMessageText.clear(); resolveMessageData(); diff --git a/Telegram/SourceFiles/history/view/controls/history_view_draft_options.cpp b/Telegram/SourceFiles/history/view/controls/history_view_draft_options.cpp index 49a5dabd43..ac6dd6fc33 100644 --- a/Telegram/SourceFiles/history/view/controls/history_view_draft_options.cpp +++ b/Telegram/SourceFiles/history/view/controls/history_view_draft_options.cpp @@ -357,8 +357,6 @@ void PreviewWrap::paintEvent(QPaintEvent *e) { _element->draw(p, context); if (_element->displayFromPhoto()) { - auto userpicMinBottomSkip = st::historyPaddingBottom - + st::msgMargin.bottom(); auto userpicBottom = height() - _element->marginBottom() - _element->marginTop(); diff --git a/Telegram/SourceFiles/history/view/history_view_context_menu.cpp b/Telegram/SourceFiles/history/view/history_view_context_menu.cpp index 8bad63c021..562069bc08 100644 --- a/Telegram/SourceFiles/history/view/history_view_context_menu.cpp +++ b/Telegram/SourceFiles/history/view/history_view_context_menu.cpp @@ -610,7 +610,6 @@ bool AddReplyToMessageAction( ? tr::lng_context_reply_msg(tr::now) : tr::lng_context_quote_and_reply(tr::now); text.replace('&', u"&&"_q); - const auto owner = &item->history()->owner(); const auto itemId = item->fullId(); menu->addAction(text, [=] { if (!item) { diff --git a/Telegram/SourceFiles/history/view/history_view_message.cpp b/Telegram/SourceFiles/history/view/history_view_message.cpp index f215e2bdd6..d8bf40a552 100644 --- a/Telegram/SourceFiles/history/view/history_view_message.cpp +++ b/Telegram/SourceFiles/history/view/history_view_message.cpp @@ -1386,7 +1386,6 @@ void Message::paintFromName( const auto from = item->displayFrom(); const auto info = from ? nullptr : item->hiddenSenderInfo(); Assert(from || info); - const auto st = context.st; const auto nameFg = !context.outbg ? FromNameFg(context, colorIndex()) : stm->msgServiceFg->c; @@ -2683,7 +2682,6 @@ TextWithEntities Message::selectedQuote( return {}; } auto modified = selection; - const auto &modifications = text.modifications(); for (const auto &modification : text.modifications()) { if (modification.position >= selection.to) { break; @@ -2777,7 +2775,6 @@ TextSelection Message::selectionFromQuote( } offset = i + 1; } - const auto &modifications = text.modifications(); //for (const auto &modification : text.modifications()) { // if (modification.position >= selection.to) { // break; diff --git a/Telegram/SourceFiles/history/view/media/history_view_giveaway.cpp b/Telegram/SourceFiles/history/view/media/history_view_giveaway.cpp index 311e9bd882..dceb0cd1d5 100644 --- a/Telegram/SourceFiles/history/view/media/history_view_giveaway.cpp +++ b/Telegram/SourceFiles/history/view/media/history_view_giveaway.cpp @@ -251,12 +251,8 @@ QSize Giveaway::countCurrentSize(int newWidth) { void Giveaway::draw(Painter &p, const PaintContext &context) const { if (width() < st::msgPadding.left() + st::msgPadding.right() + 1) return; - const auto st = context.st; - const auto sti = context.imageStyle(); const auto stm = context.messageStyle(); - auto &semibold = stm->msgServiceFg; - auto padding = inBubblePadding(); const auto outer = width(); @@ -343,7 +339,6 @@ void Giveaway::paintChannels( } const auto size = _channels[0].geometry.height(); - const auto ratio = style::DevicePixelRatio(); const auto st = context.st; const auto stm = context.messageStyle(); const auto selected = context.selected(); @@ -491,8 +486,6 @@ void Giveaway::clickHandlerPressedChanged( } if (pressed) { if (!channel.ripple) { - const auto full = QRect(0, 0, width(), height()); - const auto outer = full.marginsRemoved(inBubblePadding()); const auto owner = &parent()->history()->owner(); channel.ripple = std::make_unique( st::defaultRippleAnimation, diff --git a/Telegram/SourceFiles/ui/boxes/boost_box.cpp b/Telegram/SourceFiles/ui/boxes/boost_box.cpp index 66f504f1de..408b54c4f9 100644 --- a/Telegram/SourceFiles/ui/boxes/boost_box.cpp +++ b/Telegram/SourceFiles/ui/boxes/boost_box.cpp @@ -260,8 +260,6 @@ void AskBoostBox( box->setWidth(st::boxWideWidth); box->setStyle(st::boostBox); - const auto full = !data.boost.nextLevelBoosts; - struct State { rpl::variable you = false; bool submitted = false; diff --git a/Telegram/SourceFiles/window/window_session_controller.cpp b/Telegram/SourceFiles/window/window_session_controller.cpp index 681604d939..71de8d7b1b 100644 --- a/Telegram/SourceFiles/window/window_session_controller.cpp +++ b/Telegram/SourceFiles/window/window_session_controller.cpp @@ -685,7 +685,6 @@ void SessionNavigation::applyBoost( done(false); return; } - auto already = false; auto different = PeerId(); auto earliest = TimeId(-1); const auto now = base::unixtime::now();