diff --git a/Telegram/SourceFiles/data/data_message_reactions.cpp b/Telegram/SourceFiles/data/data_message_reactions.cpp index c0e7d9b876..e4279cbb3b 100644 --- a/Telegram/SourceFiles/data/data_message_reactions.cpp +++ b/Telegram/SourceFiles/data/data_message_reactions.cpp @@ -1194,7 +1194,6 @@ bool MessageReactions::change( } } } - const auto selfId = owner.session().userPeerId(); auto parsed = base::flat_map>(); for (const auto &reaction : recent) { reaction.match([&](const MTPDmessagePeerReaction &data) { diff --git a/Telegram/SourceFiles/data/data_poll.cpp b/Telegram/SourceFiles/data/data_poll.cpp index efe9289602..f781f95bc0 100644 --- a/Telegram/SourceFiles/data/data_poll.cpp +++ b/Telegram/SourceFiles/data/data_poll.cpp @@ -132,9 +132,6 @@ bool PollData::applyResults(const MTPPollResults &results) { } } if (const auto recent = results.vrecent_voters()) { - const auto bareProj = [](not_null user) { - return peerToUser(user->id).bare; - }; const auto recentChanged = !ranges::equal( recentVoters, recent->v, diff --git a/Telegram/SourceFiles/data/data_stories.cpp b/Telegram/SourceFiles/data/data_stories.cpp index fa3ff6b58d..add13494f1 100644 --- a/Telegram/SourceFiles/data/data_stories.cpp +++ b/Telegram/SourceFiles/data/data_stories.cpp @@ -273,7 +273,6 @@ void Stories::parseAndApply(const MTPUserStories &stories) { const auto &data = stories.data(); const auto peerId = peerFromUser(data.vuser_id()); const auto readTill = data.vmax_read_id().value_or_empty(); - const auto count = int(data.vstories().v.size()); const auto user = _owner->peer(peerId)->asUser(); auto result = StoriesSource{ .user = user, @@ -355,7 +354,6 @@ Story *Stories::parseAndApply( if (i != end(stories)) { const auto result = i->second.get(); const auto mediaChanged = (result->media() != *media); - const auto pinned = result->pinned(); result->applyChanges(*media, data, now); const auto j = _pollingSettings.find(result); if (j != end(_pollingSettings)) { @@ -577,7 +575,7 @@ void Stories::sendResolveRequests() { finish(peerId); continue; } - const auto requestId = api->request(MTPstories_GetStoriesByID( + api->request(MTPstories_GetStoriesByID( user->inputUser, MTP_vector(prepared) )).done([=](const MTPstories_Stories &result) { @@ -1083,7 +1081,6 @@ void Stories::sendIncrementViewsRequests() { return; } auto ids = QVector(); - auto peer = PeerId(); struct Prepared { PeerId peer = 0; QVector ids; @@ -1141,7 +1138,7 @@ void Stories::loadViewsSlice( MTP_int(id), MTP_int(offset ? offset->date : 0), MTP_long(offset ? peerToUser(offset->peer->id).bare : 0), - MTP_int(kViewsPerPage) + MTP_int(perPage) )).done([=](const MTPstories_StoryViewsList &result) { _viewsRequestId = 0; @@ -1595,7 +1592,6 @@ void Stories::sendPollingViewsRequests() { return; } else if (!_viewsRequestId) { Assert(_viewsDone == nullptr); - const auto one = _pollingViews.front(); loadViewsSlice(_pollingViews.front()->id(), std::nullopt, nullptr); } _pollingViewsTimer.callOnce(kPollViewsInterval); diff --git a/Telegram/SourceFiles/data/data_story.cpp b/Telegram/SourceFiles/data/data_story.cpp index 59f672a11c..210e4a8f4e 100644 --- a/Telegram/SourceFiles/data/data_story.cpp +++ b/Telegram/SourceFiles/data/data_story.cpp @@ -104,7 +104,6 @@ bool StoryPreload::LoadTask::feedPart( Expects(bytes.size() <= Storage::kDownloadPartSize); const auto part = Storage::kDownloadPartSize; - const auto index = offset / part; _requestedOffsets.remove(int(offset)); _parts[offset] = bytes; if ((_nextRequestOffset + part >= _parts.size() * part) diff --git a/Telegram/SourceFiles/dialogs/ui/dialogs_stories_list.cpp b/Telegram/SourceFiles/dialogs/ui/dialogs_stories_list.cpp index 2141540a1b..14e37d4d94 100644 --- a/Telegram/SourceFiles/dialogs/ui/dialogs_stories_list.cpp +++ b/Telegram/SourceFiles/dialogs/ui/dialogs_stories_list.cpp @@ -761,7 +761,6 @@ void List::updateSelected() { return; } const auto &st = _st.small; - const auto &full = _st.full; const auto p = mapFromGlobal(_lastMousePosition); const auto layout = computeLayout(); const auto firstRightFull = layout.leftFull diff --git a/Telegram/SourceFiles/export/data/export_data_types.cpp b/Telegram/SourceFiles/export/data/export_data_types.cpp index e2bc9fde21..6b9fc29972 100644 --- a/Telegram/SourceFiles/export/data/export_data_types.cpp +++ b/Telegram/SourceFiles/export/data/export_data_types.cpp @@ -623,7 +623,6 @@ StoriesSlice ParseStoriesSlice( ++result.skipped; story.match([&](const MTPDstoryItem &data) { const auto date = data.vdate().v; - const auto expires = data.vexpire_date().v; auto media = Media(); data.vmedia().match([&](const MTPDmessageMediaPhoto &data) { const auto suggestedPath = "stories/" diff --git a/Telegram/SourceFiles/info/media/info_media_list_widget.cpp b/Telegram/SourceFiles/info/media/info_media_list_widget.cpp index 8a06efa5c1..459f1408c9 100644 --- a/Telegram/SourceFiles/info/media/info_media_list_widget.cpp +++ b/Telegram/SourceFiles/info/media/info_media_list_widget.cpp @@ -1219,7 +1219,6 @@ void ListWidget::toggleStoryPin( confirmed(); } }; - const auto session = &_controller->session(); const auto onePhrase = pin ? tr::lng_stories_save_sure : tr::lng_stories_archive_sure; diff --git a/Telegram/SourceFiles/media/stories/media_stories_controller.cpp b/Telegram/SourceFiles/media/stories/media_stories_controller.cpp index 788806bdd7..973473de17 100644 --- a/Telegram/SourceFiles/media/stories/media_stories_controller.cpp +++ b/Telegram/SourceFiles/media/stories/media_stories_controller.cpp @@ -454,7 +454,6 @@ void Controller::initLayout() { const auto nameBoundingRect = [&](QRect geometry, bool left) { const auto skipSmall = nameFontSize; const auto skipBig = skipSmall - std::min(xLeft, 0); - const auto top = userpic(geometry).y() + innerHeight; return QRect( left ? skipBig : skipSmall, (geometry.height() - innerHeight) / 2, diff --git a/Telegram/SourceFiles/media/stories/media_stories_reactions.cpp b/Telegram/SourceFiles/media/stories/media_stories_reactions.cpp index fb94bc0261..9d4265758e 100644 --- a/Telegram/SourceFiles/media/stories/media_stories_reactions.cpp +++ b/Telegram/SourceFiles/media/stories/media_stories_reactions.cpp @@ -131,7 +131,6 @@ void Reactions::create() { } }, _parent->lifetime()); - const auto withSearch = reactions.customAllowed; _selector = std::make_unique( _parent.get(), st::storiesReactionsPan, diff --git a/Telegram/SourceFiles/media/stories/media_stories_share.cpp b/Telegram/SourceFiles/media/stories/media_stories_share.cpp index 0a9b87df57..413fbf3d16 100644 --- a/Telegram/SourceFiles/media/stories/media_stories_share.cpp +++ b/Telegram/SourceFiles/media/stories/media_stories_share.cpp @@ -105,12 +105,8 @@ namespace Media::Stories { return; } - const auto generateRandom = [&] { - return base::RandomValue(); - }; const auto api = &story->owner().session().api(); auto &histories = story->owner().histories(); - const auto requestType = Data::Histories::RequestType::Send; for (const auto thread : result) { const auto action = Api::SendAction(thread, options); if (!comment.text.isEmpty()) { @@ -119,11 +115,6 @@ namespace Media::Stories { message.action.clearDraft = false; api->sendMessage(std::move(message)); } - const auto topicRootId = thread->topicRootId(); - const auto kGeneralId = Data::ForumTopic::kGeneralId; - const auto topMsgId = (topicRootId == kGeneralId) - ? MsgId(0) - : topicRootId; const auto peer = thread->peer(); const auto threadHistory = thread->owningHistory(); const auto randomId = base::RandomValue(); @@ -131,7 +122,6 @@ namespace Media::Stories { if (action.replyTo) { sendFlags |= MTPmessages_SendMedia::Flag::f_reply_to; } - const auto anonymousPost = peer->amAnonymous(); const auto silentPost = ShouldSendSilent(peer, action.options); if (silentPost) { sendFlags |= MTPmessages_SendMedia::Flag::f_silent; diff --git a/Telegram/SourceFiles/media/stories/media_stories_sibling.cpp b/Telegram/SourceFiles/media/stories/media_stories_sibling.cpp index c95674a0b0..b8eda7d4ae 100644 --- a/Telegram/SourceFiles/media/stories/media_stories_sibling.cpp +++ b/Telegram/SourceFiles/media/stories/media_stories_sibling.cpp @@ -252,7 +252,6 @@ void Sibling::checkStory() { return; } const auto story = *maybeStory; - const auto &data = story->media().data; const auto origin = Data::FileOrigin(); v::match(story->media().data, [&](not_null photo) { _loader = std::make_unique(photo, origin, [=] { diff --git a/Telegram/SourceFiles/media/view/media_view_overlay_widget.cpp b/Telegram/SourceFiles/media/view/media_view_overlay_widget.cpp index 9690f150e5..379c341c0d 100644 --- a/Telegram/SourceFiles/media/view/media_view_overlay_widget.cpp +++ b/Telegram/SourceFiles/media/view/media_view_overlay_widget.cpp @@ -673,7 +673,6 @@ void OverlayWidget::showSaveMsgToastWith( + st::mediaviewSaveMsgPadding.top() + st::mediaviewSaveMsgPadding.bottom(); _saveMsg = QRect((width() - w) / 2, (height() - h) / 2, w, h); - const auto toIn = 1.; const auto callback = [=](float64 value) { updateSaveMsg(); if (!_saveMsgAnimation.animating()) { diff --git a/Telegram/SourceFiles/overview/overview_layout.cpp b/Telegram/SourceFiles/overview/overview_layout.cpp index 603963621f..2f8609ace6 100644 --- a/Telegram/SourceFiles/overview/overview_layout.cpp +++ b/Telegram/SourceFiles/overview/overview_layout.cpp @@ -517,7 +517,6 @@ void Video::paint(Painter &p, const QRect &clip, TextSelection selection, const if ((blurred || thumbnail || good) && ((_pix.width() != _width * cIntRetinaFactor()) || (_pixBlurred && (thumbnail || good)))) { - auto size = _width * cIntRetinaFactor(); auto img = good ? good->original() : thumbnail