From eb9582f07ab9b4eb13d517fbeedc0836deb82fc3 Mon Sep 17 00:00:00 2001 From: Francesco <100066266+cranci1@users.noreply.github.com> Date: Sat, 31 May 2025 16:20:41 +0200 Subject: [PATCH] yeah just a test --- Sora/ContentView.swift | 1 + Sora/Views/MediaInfoView/MediaInfoView.swift | 20 +++++++------------- Sora/Views/SearchView.swift | 6 +++--- 3 files changed, 11 insertions(+), 16 deletions(-) diff --git a/Sora/ContentView.swift b/Sora/ContentView.swift index 8238bd1..44f1513 100644 --- a/Sora/ContentView.swift +++ b/Sora/ContentView.swift @@ -4,6 +4,7 @@ // // Created by Francesco on 06/01/25. // + import SwiftUI struct ContentView_Previews: PreviewProvider { diff --git a/Sora/Views/MediaInfoView/MediaInfoView.swift b/Sora/Views/MediaInfoView/MediaInfoView.swift index 01d75a9..1a8d6d1 100644 --- a/Sora/Views/MediaInfoView/MediaInfoView.swift +++ b/Sora/Views/MediaInfoView/MediaInfoView.swift @@ -217,7 +217,7 @@ struct MediaInfoView: View { .aspectRatio(contentMode: .fill) .frame(width: UIScreen.main.bounds.width, height: 600) .clipped() - + KFImage(URL(string: imageUrl)) .placeholder { EmptyView() } .setProcessor(ImageUpscaler.lanczosProcessor(scale: 3, sharpeningIntensity: 1, sharpeningRadius: 1)) @@ -249,12 +249,12 @@ struct MediaInfoView: View { endPoint: .bottom ) ) - + VStack(spacing: 0) { Rectangle() .fill(Color.clear) .frame(height: 400) - + VStack(alignment: .leading, spacing: 16) { headerSection if !episodeLinks.isEmpty { @@ -275,13 +275,8 @@ struct MediaInfoView: View { startPoint: .top, endPoint: .bottom ) - .clipShape(RoundedRectangle(cornerRadius: 0)) - .shadow( - color: (colorScheme == .dark ? Color.black : Color.white).opacity(1), - radius: 10, - x: 0, - y: 10 - ) + .clipShape(RoundedRectangle(cornerRadius: 0)) + .shadow(color: (colorScheme == .dark ? Color.black : Color.white).opacity(1), radius: 10, x: 0, y: 10) ) } .deviceScaled() @@ -289,7 +284,7 @@ struct MediaInfoView: View { } .onAppear { UIScrollView.appearance().bounces = false - } + } .navigationBarTitleDisplayMode(.inline) .navigationBarTitle("") .navigationViewStyle(StackNavigationViewStyle()) @@ -578,7 +573,6 @@ struct MediaInfoView: View { @ViewBuilder private var episodesSection: some View { if episodeLinks.count == 1 { - // Don't show episodes list for single-episode media EmptyView() } else { VStack(alignment: .leading, spacing: 16) { @@ -791,7 +785,7 @@ struct MediaInfoView: View { "Marked \(ep.number - 1) episodes watched within series \"\(title)\".", type: "General" ) - + guard let listID = itemID, listID > 0 else { return } let watchedCount = ep.number - 1 let statusToSend = (watchedCount == episodeLinks.count) ? "COMPLETED" : "CURRENT" diff --git a/Sora/Views/SearchView.swift b/Sora/Views/SearchView.swift index 28dc71f..f157d4c 100644 --- a/Sora/Views/SearchView.swift +++ b/Sora/Views/SearchView.swift @@ -160,11 +160,11 @@ struct SearchView: View { private func lockOrientation() { OrientationManager.shared.lockOrientation() } - - private func unlockOrientation(after delay: TimeInterval = 1.0) { + + private func unlockOrientation(after delay: TimeInterval = 0.2) { OrientationManager.shared.unlockOrientation(after: delay) } - + private func performSearch() { Logger.shared.log("Searching for: \(searchQuery)", type: "General") guard !searchQuery.isEmpty, let module = selectedModule else {