This commit is contained in:
Francesco 2025-06-01 22:35:13 +02:00
parent ca9deebb18
commit ff76642b0c
2 changed files with 16 additions and 27 deletions

View file

@ -11,18 +11,11 @@ struct HomeSkeletonCell: View {
let cellWidth: CGFloat
var body: some View {
ZStack(alignment: .bottom) {
RoundedRectangle(cornerRadius: 10)
.fill(Color.gray.opacity(0.3))
.frame(width: cellWidth, height: cellWidth * 1.5)
.cornerRadius(10)
.shimmering()
RoundedRectangle(cornerRadius: 5)
.fill(Color.gray.opacity(0.3))
.frame(width: cellWidth - 10, height: 20)
.shimmering()
}
RoundedRectangle(cornerRadius: 10)
.fill(Color.gray.opacity(0.3))
.frame(width: cellWidth, height: cellWidth * 1.5)
.cornerRadius(10)
.shimmering()
}
}
@ -30,17 +23,9 @@ struct SearchSkeletonCell: View {
let cellWidth: CGFloat
var body: some View {
ZStack(alignment: .bottom) {
RoundedRectangle(cornerRadius: 10)
.fill(Color.gray.opacity(0.3))
.frame(width: cellWidth, height: cellWidth * 1.5)
.shimmering()
RoundedRectangle(cornerRadius: 5)
.fill(Color.gray.opacity(0.3))
.frame(width: cellWidth - 10, height: 20)
.padding(.bottom)
.shimmering()
}
RoundedRectangle(cornerRadius: 10)
.fill(Color.gray.opacity(0.3))
.frame(width: cellWidth, height: cellWidth * 1.5)
.shimmering()
}
}

View file

@ -1301,7 +1301,9 @@ struct MediaInfoView: View {
videoPlayerViewController.aniListID = itemID ?? 0
videoPlayerViewController.modalPresentationStyle = .overFullScreen
if let currentVC = UIApplication.shared.windows.first?.rootViewController?.presentedViewController ?? UIApplication.shared.windows.first?.rootViewController {
if let windowScene = UIApplication.shared.connectedScenes.first as? UIWindowScene,
let window = windowScene.windows.first,
let currentVC = window.rootViewController?.presentedViewController ?? window.rootViewController {
currentVC.present(videoPlayerViewController, animated: true, completion: nil)
}
return
@ -1341,8 +1343,10 @@ struct MediaInfoView: View {
customMediaPlayer.modalPresentationStyle = .overFullScreen
Logger.shared.log("Opening custom media player with url: \(url)")
if let currentVC = UIApplication.shared.windows.first?.rootViewController?.presentedViewController ?? UIApplication.shared.windows.first?.rootViewController {
currentVC.present(customMediaPlayer, animated: true)
if let windowScene = UIApplication.shared.connectedScenes.first as? UIWindowScene,
let window = windowScene.windows.first,
let currentVC = window.rootViewController?.presentedViewController ?? window.rootViewController {
currentVC.present(customMediaPlayer, animated: true, completion: nil)
}
}
}