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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user