mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-02-08 17:16:25 +01:00
Make loading new posts less destructive
This commit is contained in:
parent
16ae8af889
commit
03b319a517
1 changed files with 10 additions and 2 deletions
|
@ -83,8 +83,16 @@ function Home({ hidden }) {
|
||||||
if (diffMins > 1) {
|
if (diffMins > 1) {
|
||||||
console.log('visible', { lastHidden, diffMins });
|
console.log('visible', { lastHidden, diffMins });
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
loadStatuses(true);
|
(async () => {
|
||||||
states.homeNew = [];
|
const newStatus = await masto.timelines.fetchHome({
|
||||||
|
limit: 1,
|
||||||
|
});
|
||||||
|
if (newStatus.length && newStatus[0].id !== states.home[0].id) {
|
||||||
|
states.homeNew = newStatus;
|
||||||
|
}
|
||||||
|
})();
|
||||||
|
// loadStatuses(true);
|
||||||
|
// states.homeNew = [];
|
||||||
}, 100);
|
}, 100);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue