fix(fc3b): SourceFormDialog + SubscriptionsView read platforms store; drop sources.loadPlatforms

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-20 18:39:44 -04:00
parent a0203f4727
commit 408971a798
4 changed files with 20 additions and 25 deletions
-10
View File
@@ -41,16 +41,6 @@ describe('sources store', () => {
expect(calls[0]).toContain('artist_id=7')
})
it('loadPlatforms caches the platforms list', async () => {
const s = useSourcesStore()
let n = 0
stubFetch(() => { n++; return { status: 200, body: { platforms: ['patreon'] } } })
await s.loadPlatforms()
await s.loadPlatforms() // second call should hit cache
expect(n).toBe(1)
expect(s.platforms).toEqual(['patreon'])
})
it('create invalidates the all-cache and the artist-cache', async () => {
const s = useSourcesStore()
s.byArtist.set(null, [])