mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-02-02 06:06:41 +01:00
Extra check if container if not clickable
This commit is contained in:
parent
ecb1be5776
commit
caeeffaa72
1 changed files with 9 additions and 4 deletions
|
@ -226,23 +226,28 @@ function Timeline({
|
|||
|
||||
const loadOrCheckUpdates = useCallback(
|
||||
async ({ disableIdleCheck = false } = {}) => {
|
||||
console.log('✨ Load or check updates', {
|
||||
const noPointers = scrollableRef.current
|
||||
? getComputedStyle(scrollableRef.current).pointerEvents === 'none'
|
||||
: false;
|
||||
console.log('✨ Load or check updates', id, {
|
||||
autoRefresh: snapStates.settings.autoRefresh,
|
||||
scrollTop: scrollableRef.current.scrollTop,
|
||||
disableIdleCheck,
|
||||
idle: window.__IDLE__,
|
||||
inBackground: inBackground(),
|
||||
noPointers,
|
||||
});
|
||||
if (
|
||||
snapStates.settings.autoRefresh &&
|
||||
scrollableRef.current.scrollTop < 16 &&
|
||||
(disableIdleCheck || window.__IDLE__) &&
|
||||
!inBackground()
|
||||
!inBackground() &&
|
||||
!noPointers
|
||||
) {
|
||||
console.log('✨ Load updates', snapStates.settings.autoRefresh);
|
||||
console.log('✨ Load updates', id, snapStates.settings.autoRefresh);
|
||||
loadItems(true);
|
||||
} else {
|
||||
console.log('✨ Check updates', snapStates.settings.autoRefresh);
|
||||
console.log('✨ Check updates', id, snapStates.settings.autoRefresh);
|
||||
const hasUpdate = await checkForUpdates();
|
||||
if (hasUpdate) {
|
||||
console.log('✨ Has new updates', id);
|
||||
|
|
Loading…
Reference in a new issue