Media: Prepare media connection on load (#4596)
This commit is contained in:
parent
6652e9c62d
commit
4552a16c4c
@ -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() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user