Media: Prepare media connection on load (#4596)

This commit is contained in:
Alexander Zinchuk 2024-05-17 15:45:53 +02:00
parent 6652e9c62d
commit 4552a16c4c

View File

@ -244,6 +244,10 @@ class TelegramClient {
}
this._connectedDeferred.resolve();
this._isSwitchingDc = false;
// Prepare file connection on current DC to speed up initial media loading
const mediaSender = await this._borrowExportedSender(this.session.dcId, false, undefined, 0, this.isPremium);
if (mediaSender) this.releaseExportedSender(mediaSender);
}
async _initSession() {