This commit is contained in:
2026-02-04 10:02:07 -05:00
parent f7df578461
commit 72b2870f64
5 changed files with 166 additions and 13 deletions

View File

@@ -351,6 +351,17 @@ export function createFeedStore() {
return newSource
}
/** Update a source */
const updateSource = (sourceId: string, updates: Partial<PodcastSource>) => {
setSources((prev) => {
const updated = prev.map((source) =>
source.id === sourceId ? { ...source, ...updates } : source
)
saveSources(updated)
return updated
})
}
/** Remove a source */
const removeSource = (sourceId: string) => {
// Don't remove default sources
@@ -409,6 +420,7 @@ export function createFeedStore() {
addSource,
removeSource,
toggleSource,
updateSource,
}
}