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
+2 -11
View File
@@ -7,8 +7,6 @@ export const useSourcesStore = defineStore('sources', () => {
// keyed cache: null => all sources, number => artist_id filtered
const byArtist = ref(new Map())
const platforms = ref([])
const platformsLoaded = ref(false)
const loading = ref(false)
const error = ref(null)
@@ -40,13 +38,6 @@ export const useSourcesStore = defineStore('sources', () => {
}
}
async function loadPlatforms() {
if (platformsLoaded.value) return
const body = await api.get('/api/sources/platforms')
platforms.value = body.platforms
platformsLoaded.value = true
}
function _invalidate(artistId) {
byArtist.value.delete(null)
if (artistId != null) byArtist.value.delete(artistId)
@@ -99,9 +90,9 @@ export const useSourcesStore = defineStore('sources', () => {
}
return {
byArtist, platforms, platformsLoaded, loading, error,
byArtist, loading, error,
allSources,
loadAll, loadForArtist, loadPlatforms,
loadAll, loadForArtist,
create, update, remove,
findOrCreateArtist, autocompleteArtist,
sourcesByArtistGrouped,