Skip to content

Commit e658d4d

Browse files
008f5fa87cc1c4457609dc92d1f2b7836f2cfdcb
1 parent f971825 commit e658d4d

4 files changed

Lines changed: 12 additions & 26 deletions

File tree

esm/client/2_update_manager.d.ts.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

esm/client/2_update_manager.js

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,6 @@ export class UpdateManager {
257257
await __classPrivateFieldGet(this, _UpdateManager_instances, "m", _UpdateManager_processUpdates).call(this, update, false);
258258
}
259259
if (Api.is("updates.difference", difference)) {
260-
await __classPrivateFieldGet(this, _UpdateManager_instances, "m", _UpdateManager_setState).call(this, difference.state);
261260
__classPrivateFieldGet(this, _UpdateManager_LrecoverUpdateGap, "f").debug("recovered from update gap");
262261
break;
263262
}
@@ -508,19 +507,13 @@ _a = UpdateManager, _UpdateManager_c = new WeakMap(), _UpdateManager_updateState
508507
await __classPrivateFieldGet(this, _UpdateManager_instances, "m", _UpdateManager_processChannelPtsUpdateInner).call(this, update, checkGap);
509508
});
510509
}, _UpdateManager_processPtsUpdateInner = async function _UpdateManager_processPtsUpdateInner(update, checkGap) {
511-
let localState;
512-
if (update.pts != 0) {
513-
if (checkGap) {
514-
await __classPrivateFieldGet(this, _UpdateManager_instances, "m", _UpdateManager_checkGap).call(this, update.pts, update.pts_count);
515-
if (await __classPrivateFieldGet(this, _UpdateManager_instances, "m", _UpdateManager_needsGetDifference).call(this, update)) {
516-
await this.recoverUpdateGap("needsGetDifference");
517-
}
518-
localState = await __classPrivateFieldGet(this, _UpdateManager_instances, "m", _UpdateManager_getLocalState).call(this);
510+
if (update.pts != 0 && checkGap) {
511+
await __classPrivateFieldGet(this, _UpdateManager_instances, "m", _UpdateManager_checkGap).call(this, update.pts, update.pts_count);
512+
if (await __classPrivateFieldGet(this, _UpdateManager_instances, "m", _UpdateManager_needsGetDifference).call(this, update)) {
513+
await this.recoverUpdateGap("needsGetDifference");
519514
}
520515
}
521-
if (!localState) {
522-
localState = await __classPrivateFieldGet(this, _UpdateManager_instances, "m", _UpdateManager_getLocalState).call(this);
523-
}
516+
const localState = await __classPrivateFieldGet(this, _UpdateManager_instances, "m", _UpdateManager_getLocalState).call(this);
524517
if (localState.pts + update.pts_count > update.pts) {
525518
return;
526519
}

script/client/2_update_manager.d.ts.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

script/client/2_update_manager.js

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,6 @@ class UpdateManager {
260260
await __classPrivateFieldGet(this, _UpdateManager_instances, "m", _UpdateManager_processUpdates).call(this, update, false);
261261
}
262262
if (_2_tl_js_1.Api.is("updates.difference", difference)) {
263-
await __classPrivateFieldGet(this, _UpdateManager_instances, "m", _UpdateManager_setState).call(this, difference.state);
264263
__classPrivateFieldGet(this, _UpdateManager_LrecoverUpdateGap, "f").debug("recovered from update gap");
265264
break;
266265
}
@@ -512,19 +511,13 @@ _a = UpdateManager, _UpdateManager_c = new WeakMap(), _UpdateManager_updateState
512511
await __classPrivateFieldGet(this, _UpdateManager_instances, "m", _UpdateManager_processChannelPtsUpdateInner).call(this, update, checkGap);
513512
});
514513
}, _UpdateManager_processPtsUpdateInner = async function _UpdateManager_processPtsUpdateInner(update, checkGap) {
515-
let localState;
516-
if (update.pts != 0) {
517-
if (checkGap) {
518-
await __classPrivateFieldGet(this, _UpdateManager_instances, "m", _UpdateManager_checkGap).call(this, update.pts, update.pts_count);
519-
if (await __classPrivateFieldGet(this, _UpdateManager_instances, "m", _UpdateManager_needsGetDifference).call(this, update)) {
520-
await this.recoverUpdateGap("needsGetDifference");
521-
}
522-
localState = await __classPrivateFieldGet(this, _UpdateManager_instances, "m", _UpdateManager_getLocalState).call(this);
514+
if (update.pts != 0 && checkGap) {
515+
await __classPrivateFieldGet(this, _UpdateManager_instances, "m", _UpdateManager_checkGap).call(this, update.pts, update.pts_count);
516+
if (await __classPrivateFieldGet(this, _UpdateManager_instances, "m", _UpdateManager_needsGetDifference).call(this, update)) {
517+
await this.recoverUpdateGap("needsGetDifference");
523518
}
524519
}
525-
if (!localState) {
526-
localState = await __classPrivateFieldGet(this, _UpdateManager_instances, "m", _UpdateManager_getLocalState).call(this);
527-
}
520+
const localState = await __classPrivateFieldGet(this, _UpdateManager_instances, "m", _UpdateManager_getLocalState).call(this);
528521
if (localState.pts + update.pts_count > update.pts) {
529522
return;
530523
}

0 commit comments

Comments
 (0)