Fix build with GCC.
This commit is contained in:
parent
f7cbac1f46
commit
6607848abc
|
@ -1194,7 +1194,6 @@ bool MessageReactions::change(
|
|||
}
|
||||
}
|
||||
}
|
||||
const auto selfId = owner.session().userPeerId();
|
||||
auto parsed = base::flat_map<ReactionId, std::vector<RecentReaction>>();
|
||||
for (const auto &reaction : recent) {
|
||||
reaction.match([&](const MTPDmessagePeerReaction &data) {
|
||||
|
|
|
@ -132,9 +132,6 @@ bool PollData::applyResults(const MTPPollResults &results) {
|
|||
}
|
||||
}
|
||||
if (const auto recent = results.vrecent_voters()) {
|
||||
const auto bareProj = [](not_null<UserData*> user) {
|
||||
return peerToUser(user->id).bare;
|
||||
};
|
||||
const auto recentChanged = !ranges::equal(
|
||||
recentVoters,
|
||||
recent->v,
|
||||
|
|
|
@ -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<MTPint>(prepared)
|
||||
)).done([=](const MTPstories_Stories &result) {
|
||||
|
@ -1083,7 +1081,6 @@ void Stories::sendIncrementViewsRequests() {
|
|||
return;
|
||||
}
|
||||
auto ids = QVector<MTPint>();
|
||||
auto peer = PeerId();
|
||||
struct Prepared {
|
||||
PeerId peer = 0;
|
||||
QVector<MTPint> 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);
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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/"
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -131,7 +131,6 @@ void Reactions::create() {
|
|||
}
|
||||
}, _parent->lifetime());
|
||||
|
||||
const auto withSearch = reactions.customAllowed;
|
||||
_selector = std::make_unique<HistoryView::Reactions::Selector>(
|
||||
_parent.get(),
|
||||
st::storiesReactionsPan,
|
||||
|
|
|
@ -105,12 +105,8 @@ namespace Media::Stories {
|
|||
return;
|
||||
}
|
||||
|
||||
const auto generateRandom = [&] {
|
||||
return base::RandomValue<MTPlong>();
|
||||
};
|
||||
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<uint64>();
|
||||
|
@ -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;
|
||||
|
|
|
@ -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<PhotoData*> photo) {
|
||||
_loader = std::make_unique<LoaderPhoto>(photo, origin, [=] {
|
||||
|
|
|
@ -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()) {
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue