mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-01-23 00:56:23 +01:00
Remove isHovering
This commit is contained in:
parent
e3b0c31798
commit
4c3666df6a
2 changed files with 1 additions and 18 deletions
|
@ -206,7 +206,6 @@ function Timeline({
|
||||||
}
|
}
|
||||||
}, [nearReachEnd, showMore]);
|
}, [nearReachEnd, showMore]);
|
||||||
|
|
||||||
const isHovering = useRef(false);
|
|
||||||
const idle = useIdle(5000);
|
const idle = useIdle(5000);
|
||||||
console.debug('🧘♀️ IDLE', idle);
|
console.debug('🧘♀️ IDLE', idle);
|
||||||
const loadOrCheckUpdates = useCallback(
|
const loadOrCheckUpdates = useCallback(
|
||||||
|
@ -275,12 +274,6 @@ function Timeline({
|
||||||
oRef.current = node;
|
oRef.current = node;
|
||||||
}}
|
}}
|
||||||
tabIndex="-1"
|
tabIndex="-1"
|
||||||
onPointerEnter={(e) => {
|
|
||||||
isHovering.current = true;
|
|
||||||
}}
|
|
||||||
onPointerLeave={() => {
|
|
||||||
isHovering.current = false;
|
|
||||||
}}
|
|
||||||
>
|
>
|
||||||
<div class="timeline-deck deck">
|
<div class="timeline-deck deck">
|
||||||
<header
|
<header
|
||||||
|
|
|
@ -162,14 +162,12 @@ function Notifications({ columnMode }) {
|
||||||
}
|
}
|
||||||
}, [nearReachEnd, showMore]);
|
}, [nearReachEnd, showMore]);
|
||||||
|
|
||||||
const isHovering = useRef(false);
|
|
||||||
const idle = useIdle(5000);
|
const idle = useIdle(5000);
|
||||||
console.debug('🧘♀️ IDLE', idle);
|
console.debug('🧘♀️ IDLE', idle);
|
||||||
const loadUpdates = useCallback(() => {
|
const loadUpdates = useCallback(() => {
|
||||||
console.log('✨ Load updates', {
|
console.log('✨ Load updates', {
|
||||||
autoRefresh: snapStates.settings.autoRefresh,
|
autoRefresh: snapStates.settings.autoRefresh,
|
||||||
scrollTop: scrollableRef.current?.scrollTop === 0,
|
scrollTop: scrollableRef.current?.scrollTop === 0,
|
||||||
isHovering: isHovering.current,
|
|
||||||
inBackground: inBackground(),
|
inBackground: inBackground(),
|
||||||
notificationsShowNew: snapStates.notificationsShowNew,
|
notificationsShowNew: snapStates.notificationsShowNew,
|
||||||
uiState,
|
uiState,
|
||||||
|
@ -177,7 +175,7 @@ function Notifications({ columnMode }) {
|
||||||
if (
|
if (
|
||||||
snapStates.settings.autoRefresh &&
|
snapStates.settings.autoRefresh &&
|
||||||
scrollableRef.current?.scrollTop === 0 &&
|
scrollableRef.current?.scrollTop === 0 &&
|
||||||
(!isHovering.current || idle) &&
|
idle &&
|
||||||
!inBackground() &&
|
!inBackground() &&
|
||||||
snapStates.notificationsShowNew &&
|
snapStates.notificationsShowNew &&
|
||||||
uiState !== 'loading'
|
uiState !== 'loading'
|
||||||
|
@ -236,14 +234,6 @@ function Notifications({ columnMode }) {
|
||||||
class="deck-container"
|
class="deck-container"
|
||||||
ref={scrollableRef}
|
ref={scrollableRef}
|
||||||
tabIndex="-1"
|
tabIndex="-1"
|
||||||
onPointerEnter={() => {
|
|
||||||
console.log('👆 Pointer enter');
|
|
||||||
isHovering.current = true;
|
|
||||||
}}
|
|
||||||
onPointerLeave={() => {
|
|
||||||
console.log('👇 Pointer leave');
|
|
||||||
isHovering.current = false;
|
|
||||||
}}
|
|
||||||
>
|
>
|
||||||
<div class={`timeline-deck deck ${onlyMentions ? 'only-mentions' : ''}`}>
|
<div class={`timeline-deck deck ${onlyMentions ? 'only-mentions' : ''}`}>
|
||||||
<header
|
<header
|
||||||
|
|
Loading…
Reference in a new issue