mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
Readjusted code to not use localstorage, and just used redux for indicator
This commit is contained in:
@@ -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
|
||||
}
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user