From 5a8250e7cfe4170b9ed9067f78f873b9f8c4419c Mon Sep 17 00:00:00 2001 From: Jure <44338+hoornet@users.noreply.github.com> Date: Sat, 21 Mar 2026 14:53:20 +0100 Subject: [PATCH] Add podcast subscriptions with My Podcasts tab - Subscribe/unsubscribe button on podcast cards and episode list header - "My Podcasts" tab shows subscribed podcasts, opens first if subscriptions exist - Subscriptions persisted in localStorage - Tab shows subscription count - Empty state guides to search/trending --- src/components/podcast/EpisodeList.tsx | 28 ++++++++++-- src/components/podcast/PodcastCard.tsx | 57 ++++++++++++++++--------- src/components/podcast/PodcastsView.tsx | 39 +++++++++++++---- src/stores/podcast.ts | 38 ++++++++++++++++- 4 files changed, 130 insertions(+), 32 deletions(-) diff --git a/src/components/podcast/EpisodeList.tsx b/src/components/podcast/EpisodeList.tsx index 483a559..e2d51be 100644 --- a/src/components/podcast/EpisodeList.tsx +++ b/src/components/podcast/EpisodeList.tsx @@ -3,6 +3,23 @@ import type { PodcastShow, PodcastEpisode } from "../../types/podcast"; import { getEpisodes } from "../../lib/podcast"; import { usePodcastStore } from "../../stores/podcast"; +function SubscribeButton({ show }: { show: PodcastShow }) { + const subscribed = usePodcastStore((s) => s.isSubscribed(show.feedUrl)); + const { subscribe, unsubscribe } = usePodcastStore.getState(); + return ( + + ); +} + function formatDuration(seconds: number): string { if (!seconds) return ""; const h = Math.floor(seconds / 3600); @@ -60,9 +77,14 @@ export function EpisodeList({ show, onBack }: EpisodeListProps) { onError={(e) => { (e.target as HTMLImageElement).style.display = "none"; }} /> )} -
No subscriptions yet.
+Search for a podcast or browse trending to subscribe.
+