Update all components to remove sourceId from hook calls

Co-authored-by: leinelissen <10154841+leinelissen@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-02-08 20:11:35 +00:00
co-authored by leinelissen
parent 2eb7d1e622
commit fcb0dfbea1
8 changed files with 14 additions and 14 deletions
+1 -1
View File
@@ -20,7 +20,7 @@ const MAX_CONCURRENT_DOWNLOADS = 5;
function DownloadManager () {
// Retrieve store helpers
const sourceId = useSourceId();
const { queued, ids, entities } = useDownloads(sourceId);
const { queued, ids, entities } = useDownloads();
// Keep state for the currently active downloads (i.e. the downloads that
// have actually been pushed out to react-native-fs).
+1 -1
View File
@@ -42,7 +42,7 @@ function Downloads() {
const getImage = useGetImage();
const sourceId = useSourceId();
const { entities, ids } = useDownloads(sourceId);
const { entities, ids } = useDownloads();
const { tracks } = useTracks(sourceId);
// Calculate the total download size
+3 -3
View File
@@ -31,7 +31,7 @@ function SimilarAlbum({ id }: { id: string }) {
const navigation = useNavigation<NavigationProp>();
const getImage = useGetImage();
const sourceId = useSourceId();
const { albums } = useAlbums(sourceId);
const { albums } = useAlbums();
const album = albums[id];
const handlePress = useCallback(() => {
@@ -60,9 +60,9 @@ const Album: React.FC = () => {
// Retrieve the album data from the store
const sourceId = useSourceId();
const { albums } = useAlbums(sourceId);
const { albums } = useAlbums();
const album = albums[id];
const { ids: albumTrackIds } = useTracksByAlbum(sourceId, id);
const { ids: albumTrackIds } = useTracksByAlbum(id);
// Define a function for refreshing this entity
const refresh = useCallback(async () => {
+2 -2
View File
@@ -78,8 +78,8 @@ const GeneratedAlbumItem = React.memo(function GeneratedAlbumItem(props: Generat
const Albums: React.FC = () => {
// Retrieve data from store
const sourceId = useSourceId();
const { albums, isLoading, lastRefreshed } = useAlbums(sourceId);
const sections = useAlbumsByAlphabet(sourceId);
const { albums, isLoading, lastRefreshed } = useAlbums();
const sections = useAlbumsByAlphabet();
// Initialise helpers
const navigation = useNavigation<NavigationProp>();
+2 -2
View File
@@ -103,8 +103,8 @@ const GeneratedArtistItem = React.memo(function GeneratedArtistItem(props: Gener
const Artists: React.FC = () => {
// Retrieve data from store
const sourceId = useSourceId();
const { isLoading, lastRefreshed } = useArtists(sourceId);
const sections = useArtistsByAlphabet(sourceId);
const { isLoading, lastRefreshed } = useArtists();
const sections = useArtistsByAlphabet();
// Initialise helpers
const navigation = useNavigation<NavigationProp>();
+2 -2
View File
@@ -16,9 +16,9 @@ const Playlist: React.FC = () => {
// Retrieve the playlist data from the store
const sourceId = useSourceId();
const { playlists } = usePlaylists(sourceId);
const { playlists } = usePlaylists();
const playlist = playlists[id];
const { ids: playlistTrackIds } = useTracksByPlaylist(sourceId, id);
const { ids: playlistTrackIds } = useTracksByPlaylist(id);
// Define a function for refreshing this entity
const refresh = useCallback(
+1 -1
View File
@@ -39,7 +39,7 @@ const Playlists: React.FC = () => {
// Retrieve data from store
const sourceId = useSourceId();
const { playlists, ids, isLoading, lastRefreshed } = usePlaylists(sourceId);
const { playlists, ids, isLoading, lastRefreshed } = usePlaylists();
// Initialise helpers
const navigation = useNavigation<NavigationProp>();
+2 -2
View File
@@ -63,8 +63,8 @@ const RecentAlbums: React.FC = () => {
// Retrieve data from store
const sourceId = useSourceId();
const { albums, isLoading } = useAlbums(sourceId);
const { ids: recentAlbumIds } = useRecentAlbums(sourceId, 24);
const { albums, isLoading } = useAlbums();
const { ids: recentAlbumIds } = useRecentAlbums( 24);
// Initialise helpers
const navigation = useNavigation<NavigationProp>();