Readjusted code to not use localstorage, and just used redux for indicator

This commit is contained in:
Eshwar Tangirala
2025-05-22 20:10:52 -04:00
parent 0199a36238
commit 7b33717333
4 changed files with 18 additions and 27 deletions

View File

@@ -3,6 +3,7 @@ import { client } from "app/client"
import { Constants } from "app/constants"
import { type EntrySource, type EntrySourceType, entriesSlice, setMarkAllAsReadConfirmationDialogOpen, setSearch } from "app/entries/slice"
import type { RootState } from "app/store"
import { setHasNewEntries } from "app/tree/slice"
import { reloadTree } from "app/tree/thunks"
import type { Entry, MarkRequest, TagRequest } from "app/types"
import { reloadTags } from "app/user/thunks"
@@ -26,6 +27,11 @@ export const loadEntries = createAppAsyncThunk(
const state = thunkApi.getState()
const endpoint = getEndpoint(arg.source.type)
const result = await endpoint(buildGetEntriesPaginatedRequest(state, arg.source, 0))
console.log(arg.source.id)
if (arg.source.type === "feed") {
thunkApi.dispatch(setHasNewEntries({ feedId: +arg.source.id, value: false }))
}
return result.data
}
)