Live Activities fix

This commit is contained in:
2026-04-19 16:57:57 +02:00
parent 053c743c41
commit c41b58d837
24 changed files with 1079 additions and 7 deletions
@@ -13,6 +13,7 @@ private let syncLogger = Logger(subsystem: Bundle.main.bundleIdentifier ?? "Mobi
struct MainTabView: View {
@Environment(MAService.self) private var service
@Environment(\.scenePhase) private var scenePhase
@State private var selectedTab: String = "library"
var body: some View {
@@ -49,6 +50,11 @@ struct MainTabView: View {
.onDisappear {
service.playerManager.stopListening()
}
.onChange(of: scenePhase) { _, newPhase in
if newPhase == .active {
Task { try? await service.playerManager.loadPlayers() }
}
}
}
}
@@ -93,7 +99,7 @@ struct PlayerListView: View {
var body: some View {
NavigationStack {
Group {
if isLoading {
if isLoading && !hasContent {
ProgressView()
} else if let errorMessage {
ContentUnavailableView(