mirror of
https://github.com/cheeaun/phanpy.git
synced 2024-11-24 18:25:41 +03: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) {
|
||||
console.log('visible', { lastHidden, diffMins });
|
||||
setTimeout(() => {
|
||||
loadStatuses(true);
|
||||
states.homeNew = [];
|
||||
(async () => {
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue