mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-02-24 00:38:49 +01:00
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');
|
||||
setTimeout(() => {
|
||||
(async () => {
|
||||
const newStatus = await masto.timelines.fetchHome({
|
||||
const newStatuses = await masto.timelines.fetchHome({
|
||||
limit: 2,
|
||||
// Need 2 because "new posts" only appear when there are 2 or more
|
||||
});
|
||||
if (newStatus.length && newStatus[0].id !== states.home[0].id) {
|
||||
states.homeNew = newStatus;
|
||||
if (
|
||||
newStatuses.value.length &&
|
||||
newStatuses.value[0].id !== states.home[0].id
|
||||
) {
|
||||
states.homeNew = newStatuses.value;
|
||||
}
|
||||
setUIState('default');
|
||||
})();
|
||||
|
|
Loading…
Reference in a new issue