Attempt to fix weird "latest" item bug

This commit is contained in:
Lim Chee Aun 2023-03-25 20:18:53 +08:00
parent 436d0f815d
commit f5646fe8a8

View file

@ -54,10 +54,13 @@ function Following({ title, path, id, ...props }) {
.next(); .next();
let { value } = results; let { value } = results;
console.log('checkForUpdates', latestItem.current, value); console.log('checkForUpdates', latestItem.current, value);
if (value?.length) {
latestItem.current = value[0].id;
value = filteredItems(value, 'home'); value = filteredItems(value, 'home');
if (value?.length && value.some((item) => !item.reblog)) { if (value.some((item) => !item.reblog)) {
return true; return true;
} }
}
return false; return false;
} catch (e) { } catch (e) {
return false; return false;