Don't request IV two times in a row.

This commit is contained in:
John Preston 2024-04-26 19:48:28 +04:00
parent 7addcf2d25
commit 2949cdab61

View file

@ -813,6 +813,7 @@ void Instance::show(
if (!urlChecked) { if (!urlChecked) {
break; break;
} }
_fullRequested[_shownSession].emplace(event.url);
_shownSession->api().request(MTPmessages_GetWebPage( _shownSession->api().request(MTPmessages_GetWebPage(
MTP_string(event.url), MTP_string(event.url),
MTP_int(0) MTP_int(0)
@ -947,6 +948,7 @@ void Instance::openWithIvPreferred(
}; };
_ivRequestSession = session; _ivRequestSession = session;
_ivRequestUri = uri; _ivRequestUri = uri;
_fullRequested[session].emplace(url);
_ivRequestId = session->api().request(MTPmessages_GetWebPage( _ivRequestId = session->api().request(MTPmessages_GetWebPage(
MTP_string(url), MTP_string(url),
MTP_int(0) MTP_int(0)