mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-02-02 14:16:39 +01:00
Getting trolled by my own code
This commit is contained in:
parent
77c1b36a1f
commit
515b988b94
1 changed files with 6 additions and 6 deletions
12
src/app.jsx
12
src/app.jsx
|
@ -429,10 +429,10 @@ function startVisibility() {
|
|||
console.log('visible', { lastHidden, diffMins });
|
||||
(async () => {
|
||||
try {
|
||||
const firstStatusID = states.home[0]?.id;
|
||||
const firstNotificationID = states.notifications[0]?.id;
|
||||
const firstStatusID = states.homeLast?.id;
|
||||
const firstNotificationID = states.notificationsLast?.id;
|
||||
const fetchHome = masto.v1.timelines.listHome({
|
||||
limit: 1,
|
||||
limit: 5,
|
||||
...(firstStatusID && { sinceId: firstStatusID }),
|
||||
});
|
||||
const fetchNotifications = masto.v1.notifications.list({
|
||||
|
@ -441,10 +441,10 @@ function startVisibility() {
|
|||
});
|
||||
|
||||
const newStatuses = await fetchHome;
|
||||
const newStatus = newStatuses?.[0];
|
||||
const inHome = newStatus?.id !== states.homeLast?.id;
|
||||
const hasOneAndReblog =
|
||||
newStatuses.length === 1 && newStatuses?.[0]?.reblog;
|
||||
if (newStatuses.length && !inHome) {
|
||||
if (states.settings.boostsCarousel && newStatus.reblog) {
|
||||
if (states.settings.boostsCarousel && hasOneAndReblog) {
|
||||
// do nothing
|
||||
} else {
|
||||
states.homeNew = newStatuses.map((status) => {
|
||||
|
|
Loading…
Reference in a new issue