mirror of
https://github.com/streamyfin/streamyfin.git
synced 2026-04-22 08:44:41 +01:00
fix(tv): remove deprecated presentUserPicker API
This commit is contained in:
@@ -35,27 +35,6 @@ public class TvUserProfileModule: Module {
|
||||
#endif
|
||||
}
|
||||
|
||||
// Present the system user picker
|
||||
AsyncFunction("presentUserPicker") { () -> Bool in
|
||||
#if os(tvOS)
|
||||
return await withCheckedContinuation { continuation in
|
||||
DispatchQueue.main.async {
|
||||
self.userManager.presentProfilePreferencePanel { error in
|
||||
if let error = error {
|
||||
print("[TvUserProfile] Error presenting user picker: \(error)")
|
||||
continuation.resume(returning: false)
|
||||
} else {
|
||||
print("[TvUserProfile] User picker presented, new ID: \(self.userManager.currentUserIdentifier ?? "nil")")
|
||||
continuation.resume(returning: true)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#else
|
||||
return false
|
||||
#endif
|
||||
}
|
||||
|
||||
OnCreate {
|
||||
#if os(tvOS)
|
||||
self.setupProfileObserver()
|
||||
|
||||
Reference in New Issue
Block a user