Fix new posts check not working
This commit is contained in:
parent
c828f53f09
commit
6c0aedcd3e
1 changed files with 6 additions and 3 deletions
|
@ -85,12 +85,15 @@ function Home({ hidden }) {
|
||||||
setUIState('loading');
|
setUIState('loading');
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
(async () => {
|
(async () => {
|
||||||
const newStatus = await masto.timelines.fetchHome({
|
const newStatuses = await masto.timelines.fetchHome({
|
||||||
limit: 2,
|
limit: 2,
|
||||||
// Need 2 because "new posts" only appear when there are 2 or more
|
// Need 2 because "new posts" only appear when there are 2 or more
|
||||||
});
|
});
|
||||||
if (newStatus.length && newStatus[0].id !== states.home[0].id) {
|
if (
|
||||||
states.homeNew = newStatus;
|
newStatuses.value.length &&
|
||||||
|
newStatuses.value[0].id !== states.home[0].id
|
||||||
|
) {
|
||||||
|
states.homeNew = newStatuses.value;
|
||||||
}
|
}
|
||||||
setUIState('default');
|
setUIState('default');
|
||||||
})();
|
})();
|
||||||
|
|
Loading…
Add table
Reference in a new issue