mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-03-22 13:49:23 +01:00
Test add this as dep
This commit is contained in:
parent
5208df4a28
commit
11324364a5
1 changed files with 20 additions and 17 deletions
|
@ -193,7 +193,8 @@ function Timeline({
|
||||||
}, [nearReachEnd, showMore]);
|
}, [nearReachEnd, showMore]);
|
||||||
|
|
||||||
const lastHiddenTime = useRef();
|
const lastHiddenTime = useRef();
|
||||||
usePageVisibility((visible) => {
|
usePageVisibility(
|
||||||
|
(visible) => {
|
||||||
if (visible) {
|
if (visible) {
|
||||||
const timeDiff = Date.now() - lastHiddenTime.current;
|
const timeDiff = Date.now() - lastHiddenTime.current;
|
||||||
if (!lastHiddenTime.current || timeDiff > 1000 * 60) {
|
if (!lastHiddenTime.current || timeDiff > 1000 * 60) {
|
||||||
|
@ -210,7 +211,9 @@ function Timeline({
|
||||||
lastHiddenTime.current = Date.now();
|
lastHiddenTime.current = Date.now();
|
||||||
}
|
}
|
||||||
setVisible(visible);
|
setVisible(visible);
|
||||||
}, []);
|
},
|
||||||
|
[checkForUpdates],
|
||||||
|
);
|
||||||
|
|
||||||
// checkForUpdates interval
|
// checkForUpdates interval
|
||||||
useInterval(
|
useInterval(
|
||||||
|
|
Loading…
Reference in a new issue