Capture player weakly in outer Task to fix mismatched ownership warning

This commit is contained in:
Arkadiusz Fal
2026-05-14 19:38:13 +02:00
parent c168fbae02
commit c49ae6c6a6

View File

@@ -229,7 +229,7 @@ final class AppEnvironment {
// Wire up SMB client to check if SMB playback is active
// This prevents crashes from concurrent libsmbclient usage
let smbClientRef = self.smbClient
Task {
Task { [weak player] in
await smbClientRef.setPlaybackActiveCallback { [weak player] in
player?.state.isSMBPlaybackActive ?? false
}