1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-11-29 16:43:09 +03:00

remove debug logging

This commit is contained in:
David Baker
2018-10-10 17:06:26 +01:00
parent 30362091e5
commit dea70af889

View File

@@ -435,13 +435,11 @@ SyncApi.prototype._wasLazyLoadingToggled = async function(lazyLoadMembers) {
// if we don't know any better // if we don't know any better
let lazyLoadMembersBefore = false; let lazyLoadMembersBefore = false;
const isStoreNewlyCreated = await this.client.store.isNewlyCreated(); const isStoreNewlyCreated = await this.client.store.isNewlyCreated();
console.log("store newly created? "+isStoreNewlyCreated);
if (!isStoreNewlyCreated) { if (!isStoreNewlyCreated) {
const prevClientOptions = await this.client.store.getClientOptions(); const prevClientOptions = await this.client.store.getClientOptions();
if (prevClientOptions) { if (prevClientOptions) {
lazyLoadMembersBefore = !!prevClientOptions.lazyLoadMembers; lazyLoadMembersBefore = !!prevClientOptions.lazyLoadMembers;
} }
console.log("prev ll: "+lazyLoadMembersBefore);
return lazyLoadMembersBefore !== lazyLoadMembers; return lazyLoadMembersBefore !== lazyLoadMembers;
} }
return false; return false;
@@ -494,7 +492,6 @@ SyncApi.prototype.sync = function() {
} }
if (this.opts.lazyLoadMembers) { if (this.opts.lazyLoadMembers) {
const supported = await client.doesServerSupportLazyLoading(); const supported = await client.doesServerSupportLazyLoading();
console.log("server supports ll? "+supported);
if (supported) { if (supported) {
this.opts.filter = await client.createFilter( this.opts.filter = await client.createFilter(
Filter.LAZY_LOADING_SYNC_FILTER, Filter.LAZY_LOADING_SYNC_FILTER,
@@ -507,7 +504,6 @@ SyncApi.prototype.sync = function() {
} }
// need to vape the store when enabling LL and wasn't enabled before // need to vape the store when enabling LL and wasn't enabled before
const shouldClear = await this._wasLazyLoadingToggled(this.opts.lazyLoadMembers); const shouldClear = await this._wasLazyLoadingToggled(this.opts.lazyLoadMembers);
console.log("was toggled? "+shouldClear);
if (shouldClear) { if (shouldClear) {
this._storeIsInvalid = true; this._storeIsInvalid = true;
const reason = InvalidStoreError.TOGGLED_LAZY_LOADING; const reason = InvalidStoreError.TOGGLED_LAZY_LOADING;