diff --git a/Telegram/SourceFiles/boxes/peers/replace_boost_box.cpp b/Telegram/SourceFiles/boxes/peers/replace_boost_box.cpp index 36f18ab23..f57573d99 100644 --- a/Telegram/SourceFiles/boxes/peers/replace_boost_box.cpp +++ b/Telegram/SourceFiles/boxes/peers/replace_boost_box.cpp @@ -425,14 +425,9 @@ Ui::BoostCounters ParseBoostCounters( } Ui::BoostFeatures LookupBoostFeatures(not_null channel) { - const auto group = channel->isMegagroup(); - const auto appConfig = &channel->session().account().appConfig(); - const auto get = [&](const QString &key, int fallback, bool ok = true) { - return ok ? appConfig->get(key, fallback) : 0; - }; - auto nameColorsByLevel = base::flat_map(); auto linkStylesByLevel = base::flat_map(); + const auto group = channel->isMegagroup(); const auto peerColors = &channel->session().api().peerColors(); const auto &list = group ? peerColors->requiredLevelsGroup() diff --git a/Telegram/SourceFiles/data/business/data_shortcut_messages.cpp b/Telegram/SourceFiles/data/business/data_shortcut_messages.cpp index df2f5f880..75b27a25b 100644 --- a/Telegram/SourceFiles/data/business/data_shortcut_messages.cpp +++ b/Telegram/SourceFiles/data/business/data_shortcut_messages.cpp @@ -262,7 +262,6 @@ void ShortcutMessages::scheduleShortcutsReload() { } void ShortcutMessages::apply(const MTPDupdateNewQuickReply &update) { - const auto selfId = _session->userPeerId(); const auto &reply = update.vquick_reply(); auto foundId = BusinessShortcutId(); const auto shortcut = parseShortcut(reply); diff --git a/Telegram/SourceFiles/history/view/media/history_view_contact.cpp b/Telegram/SourceFiles/history/view/media/history_view_contact.cpp index 1a3e35716..1e6654abd 100644 --- a/Telegram/SourceFiles/history/view/media/history_view_contact.cpp +++ b/Telegram/SourceFiles/history/view/media/history_view_contact.cpp @@ -244,10 +244,8 @@ void Contact::draw(Painter &p, const PaintContext &context) const { } const auto st = context.st; - const auto sti = context.imageStyle(); const auto stm = context.messageStyle(); - const auto bubble = st::msgPadding; const auto full = Rect(currentSize()); const auto outer = full - inBubblePadding(); const auto inner = outer - innerMargin(); @@ -438,7 +436,6 @@ TextState Contact::textState(QPoint point, StateRequest request) const { if (_buttons.size() > 1) { const auto end = rect::bottom(inner) + _st.padding.bottom(); - const auto line = st::historyPageButtonLine; const auto bWidth = inner.width() / float64(_buttons.size()); const auto bHeight = rect::bottom(outer) - end; for (auto i = 0; i < _buttons.size(); i++) { diff --git a/Telegram/SourceFiles/info/info_content_widget.cpp b/Telegram/SourceFiles/info/info_content_widget.cpp index 440c125b2..b2908c3ac 100644 --- a/Telegram/SourceFiles/info/info_content_widget.cpp +++ b/Telegram/SourceFiles/info/info_content_widget.cpp @@ -167,12 +167,7 @@ Ui::RpWidget *ContentWidget::doSetInnerWidget( const auto bottom = top + height; _innerDesiredHeight = desired; _innerWrap->setVisibleTopBottom(top, bottom); - LOG(("TOP: %1, HEIGHT: %2, DESIRED: %3, TILL: %4").arg(top).arg(height).arg(desired).arg(std::max(desired - bottom, 0))); _scrollTillBottomChanges.fire_copy(std::max(desired - bottom, 0)); - //const auto bottom = _scroll->scrollTop() + _scroll->height(); - //_innerDesiredHeight = desired; - //_innerWrap->setVisibleTopBottom(_scroll->scrollTop(), bottom); - //_scrollTillBottomChanges.fire_copy(std::max(desired - bottom, 0)); }, _innerWrap->lifetime()); return _innerWrap->entity(); diff --git a/Telegram/SourceFiles/info/info_layer_widget.cpp b/Telegram/SourceFiles/info/info_layer_widget.cpp index 50eca4456..3404cf932 100644 --- a/Telegram/SourceFiles/info/info_layer_widget.cpp +++ b/Telegram/SourceFiles/info/info_layer_widget.cpp @@ -138,7 +138,6 @@ void LayerWidget::setContentHeight(int height) { if (_contentWrapHeight == height) { return; } - LOG(("CONTENT WRAP HEIGHT: %1 -> %2").arg(_contentWrapHeight).arg(height)); _contentWrapHeight = height; if (_inResize) { _pendingResize = true; @@ -261,35 +260,6 @@ int LayerWidget::resizeGetHeight(int newWidth) { auto attempts = 0; while (true) { _inResize = true; - { - const auto &parentSize = parentWidget()->size(); - const auto windowWidth = parentSize.width(); - const auto windowHeight = parentSize.height(); - const auto newLeft = (windowWidth - newWidth) / 2; - const auto newTop = std::clamp( - windowHeight / 24, - st::infoLayerTopMinimal, - st::infoLayerTopMaximal); - const auto newBottom = newTop; - - const auto bottomRadius = st::boxRadius; - const auto maxVisibleHeight = windowHeight - newTop; - // Top rounding is included in _contentWrapHeight. - auto desiredHeight = _contentWrapHeight + bottomRadius; - accumulate_min(desiredHeight, maxVisibleHeight - newBottom); - - // First resize content to new width and get the new desired height. - const auto contentLeft = 0; - const auto contentTop = 0; - const auto contentBottom = bottomRadius; - const auto contentWidth = newWidth; - auto contentHeight = desiredHeight - contentTop - contentBottom; - LOG(("ATTEMPT %1: WIDTH %2, WRAP HEIGHT %3, SCROLL TILL BOTTOM: %4" - ).arg(attempts + 1 - ).arg(newWidth - ).arg(_contentWrapHeight - ).arg(_contentWrap->scrollTillBottom(contentHeight))); - } const auto newGeometry = countGeometry(newWidth); _inResize = false; if (!_pendingResize) { diff --git a/Telegram/SourceFiles/settings/business/settings_chatbots.cpp b/Telegram/SourceFiles/settings/business/settings_chatbots.cpp index 78d446200..656d49958 100644 --- a/Telegram/SourceFiles/settings/business/settings_chatbots.cpp +++ b/Telegram/SourceFiles/settings/business/settings_chatbots.cpp @@ -479,7 +479,6 @@ void Chatbots::setupContent( void Chatbots::save() { const auto show = controller()->uiShow(); - const auto session = &controller()->session(); const auto fail = [=](QString error) { if (error == u"BUSINESS_RECIPIENTS_EMPTY"_q) { show->showToast(tr::lng_greeting_recipients_empty(tr::now)); diff --git a/Telegram/SourceFiles/settings/business/settings_quick_replies.cpp b/Telegram/SourceFiles/settings/business/settings_quick_replies.cpp index 97b0c9a61..d451feb1b 100644 --- a/Telegram/SourceFiles/settings/business/settings_quick_replies.cpp +++ b/Telegram/SourceFiles/settings/business/settings_quick_replies.cpp @@ -130,7 +130,6 @@ void QuickReplies::setupContent( auto old = inner->count(); const auto &shortcuts = messages->shortcuts(); - auto i = 0; for (const auto &[_, shortcut] : shortcuts.list | ranges::views::reverse) { if (!shortcut.count) { diff --git a/Telegram/SourceFiles/settings/business/settings_recipients_helper.cpp b/Telegram/SourceFiles/settings/business/settings_recipients_helper.cpp index 7f7f2b715..160b1d83b 100644 --- a/Telegram/SourceFiles/settings/business/settings_recipients_helper.cpp +++ b/Telegram/SourceFiles/settings/business/settings_recipients_helper.cpp @@ -171,7 +171,7 @@ void AddBusinessRecipientsSelector( const auto all = current.allButExcluded || current.included.empty(); const auto group = std::make_shared( all ? kAllExcept : kSelectedOnly); - const auto everyone = container->add( + container->add( object_ptr( container, group, @@ -179,7 +179,7 @@ void AddBusinessRecipientsSelector( tr::lng_chatbots_all_except(tr::now), st::settingsChatbotsAccess), st::settingsChatbotsAccessMargins); - const auto selected = container->add( + container->add( object_ptr( container, group, diff --git a/Telegram/SourceFiles/settings/business/settings_shortcut_messages.cpp b/Telegram/SourceFiles/settings/business/settings_shortcut_messages.cpp index 3b1143126..e1fcec944 100644 --- a/Telegram/SourceFiles/settings/business/settings_shortcut_messages.cpp +++ b/Telegram/SourceFiles/settings/business/settings_shortcut_messages.cpp @@ -181,7 +181,6 @@ private: void processScroll(); void updateInnerVisibleArea(); - void pushReplyReturn(not_null item); void checkReplyReturns(); void confirmDeleteSelected(); void clearSelected(); @@ -565,7 +564,6 @@ bool ShortcutMessages::paintOuter( not_null outer, int maxVisibleHeight, QRect clip) { - const auto window = outer->window()->height(); Window::SectionWidget::PaintBackground( _theme.get(), outer, @@ -1092,12 +1090,6 @@ bool ShortcutMessages::cornerButtonsHas(CornerButtonType type) { return (type == CornerButtonType::Down); } -void ShortcutMessages::pushReplyReturn(not_null item) { - if (item->shortcutId() == _shortcutId.current()) { - _cornerButtons.pushReplyReturn(item); - } -} - void ShortcutMessages::checkReplyReturns() { const auto currentTop = _scroll->scrollTop(); const auto shortcutId = _shortcutId.current(); diff --git a/Telegram/SourceFiles/settings/business/settings_working_hours.cpp b/Telegram/SourceFiles/settings/business/settings_working_hours.cpp index 525d069a4..fe80e5c73 100644 --- a/Telegram/SourceFiles/settings/business/settings_working_hours.cpp +++ b/Telegram/SourceFiles/settings/business/settings_working_hours.cpp @@ -60,7 +60,6 @@ private: const auto abs = std::abs(data.utcOffset); const auto hours = abs / 3600; const auto minutes = (abs % 3600) / 60; - const auto seconds = abs % 60; const auto sign = (data.utcOffset < 0) ? '-' : '+'; const auto prefix = u"(UTC"_q + sign @@ -366,7 +365,6 @@ void EditDayBox( const auto from = std::max( std::min(last + 30 * 60, kDay - 30 * 60), last + 60); - const auto till = std::min(from + 4 * 3600, kDay + 30 * 60); now.list.push_back({ from, from + 4 * 3600 }); } state->data = std::move(now);