diff --git a/Yattee/Views/MediaBrowser/MediaBrowserView.swift b/Yattee/Views/MediaBrowser/MediaBrowserView.swift index f96fbb70..5afc17e9 100644 --- a/Yattee/Views/MediaBrowser/MediaBrowserView.swift +++ b/Yattee/Views/MediaBrowser/MediaBrowserView.swift @@ -152,30 +152,32 @@ struct MediaBrowserView: View { title: navigationTitle ) { VStack(spacing: 0) { - if !(isLoading && files.isEmpty) { - HStack(spacing: 24) { - Button { - Task { await loadFiles() } - } label: { - Label(String(localized: "common.refresh"), systemImage: "arrow.clockwise") - } - Button { - showViewOptions = true - } label: { - Label( - String(localized: "viewOptions.title"), - systemImage: showOnlyPlayable - ? "line.3.horizontal.decrease.circle.fill" - : "line.3.horizontal.decrease.circle" - ) - } - Spacer() + // Shown while the first listing loads too: an SMB or WebDAV + // connection can hang for a long time, and the spinner alone + // gives the remote nothing to focus. + HStack(spacing: 24) { + Button { + guard !isLoading else { return } + Task { await loadFiles() } + } label: { + Label(String(localized: "common.refresh"), systemImage: "arrow.clockwise") } - .padding(.horizontal, 24) - .padding(.top, 16) - .padding(.bottom, 8) - .focusSection() + Button { + showViewOptions = true + } label: { + Label( + String(localized: "viewOptions.title"), + systemImage: showOnlyPlayable + ? "line.3.horizontal.decrease.circle.fill" + : "line.3.horizontal.decrease.circle" + ) + } + Spacer() } + .padding(.horizontal, 24) + .padding(.top, 16) + .padding(.bottom, 8) + .focusSection() inner .focusSection() }