|
|
@ -314,6 +314,7 @@ export default class AppSharedMediaTab implements SliderTab { |
|
|
|
const scrollBarWidth = container.offsetWidth - container.clientWidth; |
|
|
|
const scrollBarWidth = container.offsetWidth - container.clientWidth; |
|
|
|
container.style.overflowY = 'hidden'; |
|
|
|
container.style.overflowY = 'hidden'; |
|
|
|
container.style.paddingRight = `${scrollBarWidth}px`; |
|
|
|
container.style.paddingRight = `${scrollBarWidth}px`; |
|
|
|
|
|
|
|
this.contentContainer.classList.add('sliding'); |
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
@ -322,6 +323,7 @@ export default class AppSharedMediaTab implements SliderTab { |
|
|
|
const container = this.scroll.container; |
|
|
|
const container = this.scroll.container; |
|
|
|
container.style.overflowY = ''; |
|
|
|
container.style.overflowY = ''; |
|
|
|
container.style.paddingRight = '0'; |
|
|
|
container.style.paddingRight = '0'; |
|
|
|
|
|
|
|
this.contentContainer.classList.remove('sliding'); |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
public filterMessagesByType(ids: number[], type: SharedMediaType) { |
|
|
|
public filterMessagesByType(ids: number[], type: SharedMediaType) { |
|
|
@ -688,7 +690,7 @@ export default class AppSharedMediaTab implements SliderTab { |
|
|
|
|
|
|
|
|
|
|
|
const peerId = this.peerId; |
|
|
|
const peerId = this.peerId; |
|
|
|
|
|
|
|
|
|
|
|
let typesToLoad = single ? [this.sharedMediaType] : this.sharedMediaTypes; |
|
|
|
let typesToLoad = single ? [this.sharedMediaType] : this.sharedMediaTypes.filter(t => t !== this.sharedMediaType); |
|
|
|
typesToLoad = typesToLoad.filter(type => !this.loadedAllMedia[type] |
|
|
|
typesToLoad = typesToLoad.filter(type => !this.loadedAllMedia[type] |
|
|
|
|| this.usedFromHistory[type] < this.historiesStorage[peerId][type].length); |
|
|
|
|| this.usedFromHistory[type] < this.historiesStorage[peerId][type].length); |
|
|
|
|
|
|
|
|
|
|
@ -769,10 +771,13 @@ export default class AppSharedMediaTab implements SliderTab { |
|
|
|
this.loadSidebarMediaPromises[type].then(() => { |
|
|
|
this.loadSidebarMediaPromises[type].then(() => { |
|
|
|
setTimeout(() => { |
|
|
|
setTimeout(() => { |
|
|
|
this.log('will preload more'); |
|
|
|
this.log('will preload more'); |
|
|
|
this.loadSidebarMedia(true, true).then(() => { |
|
|
|
const promise = this.loadSidebarMedia(true, true); |
|
|
|
this.log('preloaded more'); |
|
|
|
if(promise) { |
|
|
|
this.scroll.checkForTriggers(); |
|
|
|
promise.then(() => { |
|
|
|
}); |
|
|
|
this.log('preloaded more'); |
|
|
|
|
|
|
|
this.scroll.checkForTriggers(); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
}, 0); |
|
|
|
}, 0); |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|