mirror of
https://github.com/yattee/yattee.git
synced 2025-08-09 20:24:06 +00:00
Don't draw player when in background
This commit is contained in:
@@ -61,6 +61,11 @@ struct YatteeApp: App {
|
||||
) { _ in
|
||||
player.handleEnterForeground()
|
||||
}
|
||||
.onReceive(
|
||||
NotificationCenter.default.publisher(for: UIApplication.didEnterBackgroundNotification)
|
||||
) { _ in
|
||||
player.handleEnterBackground()
|
||||
}
|
||||
#endif
|
||||
#if os(iOS)
|
||||
.handlesExternalEvents(preferring: Set(["*"]), allowing: Set(["*"]))
|
||||
|
Reference in New Issue
Block a user