fix suggested changes

This commit is contained in:
PangMo5 2021-08-26 02:22:28 +09:00
parent 5d96de329f
commit 3235f8046d
4 changed files with 8 additions and 26 deletions

View File

@ -977,16 +977,16 @@
62C29E9D26D0FE5900C1D2E7 /* Coordinators */ = {
isa = PBXGroup;
children = (
62C29EA226D1030F00C1D2E7 /* ConnectToServerCoodinator.swift */,
6220D0B926D6092100B8E046 /* FilterCoordinator.swift */,
62C29EA526D1036A00C1D2E7 /* HomeCoordinator.swift */,
6220D0BF26D61C5000B8E046 /* ItemCoordinator.swift */,
6220D0B326D5ED8000B8E046 /* LibraryCoordinator.swift */,
62C29EA726D103D500C1D2E7 /* LibraryListCoordinator.swift */,
62C29E9E26D1016600C1D2E7 /* MainCoordinator.swift */,
62C29EA026D102A500C1D2E7 /* MainTabCoordinator.swift */,
62C29EA226D1030F00C1D2E7 /* ConnectToServerCoodinator.swift */,
62C29EA526D1036A00C1D2E7 /* HomeCoordinator.swift */,
62C29EA726D103D500C1D2E7 /* LibraryListCoordinator.swift */,
6220D0B026D5EC9900B8E046 /* SettingsCoordinator.swift */,
6220D0B326D5ED8000B8E046 /* LibraryCoordinator.swift */,
6220D0B626D5EE1100B8E046 /* SearchCoordinator.swift */,
6220D0B926D6092100B8E046 /* FilterCoordinator.swift */,
6220D0BF26D61C5000B8E046 /* ItemCoordinator.swift */,
6220D0B026D5EC9900B8E046 /* SettingsCoordinator.swift */,
6220D0C526D62D8700B8E046 /* VideoPlayerCoordinator.swift */,
);
path = Coordinators;

View File

@ -44,6 +44,7 @@ struct SettingsView: View {
Spacer()
Text(ServerEnvironment.current.server.name ?? "")
.foregroundColor(.jellyfinPurple)
Image(systemName: "chevron.right")
}
}

View File

@ -9,7 +9,6 @@
import Foundation
import Stinsen
import URLNavigator
final class AppURLHandler {
static let deepLinkScheme = "jellyfin"
@ -46,7 +45,6 @@ extension AppURLHandler {
guard url.scheme == Self.deepLinkScheme || url.scheme == "widget-extension" else {
return false
}
print(AppURLHandler.shared.appURLState.allowedScheme(with: url))
if AppURLHandler.shared.appURLState.allowedScheme(with: url) {
if launchURL == nil {
return processURL(url)
@ -58,8 +56,6 @@ extension AppURLHandler {
}
func processLaunchedURLIfNeeded() {
print("!@#!@#!@#!@#!@#!@")
print(launchURL)
guard let launchURL = launchURL else { return }
if processDeepLink(url: launchURL) {
self.launchURL = nil
@ -67,7 +63,6 @@ extension AppURLHandler {
}
private func processURL(_ url: URL) -> Bool {
print("processURL(_ url: URL) -> Bool")
if processURLForUser(url: url) {
return true
}
@ -76,15 +71,6 @@ extension AppURLHandler {
}
private func processURLForUser(url: URL) -> Bool {
print("processURLForUser(_ url: URL) -> Bool")
print(url)
print(url.host)
print(url.path)
print(url.pathComponents)
print(url.pathComponents[safe: 0])
print(url.pathComponents[safe: 1])
print(url.pathComponents[safe: 2])
print(url.pathComponents[safe: 3])
guard url.host?.lowercased() == "users",
url.pathComponents[safe: 1]?.isEmpty == false else { return false }
@ -92,7 +78,6 @@ extension AppURLHandler {
if url.pathComponents[safe: 2]?.lowercased() == "items",
let itemID = url.pathComponents[safe: 3]
{
print("Passed!@#")
router?.route(to: .item(viewModel: .init(id: itemID)))
return true
}

View File

@ -29,10 +29,6 @@ final class ConnectToServerViewModel: ViewModel {
private let discovery = ServerDiscovery()
@Published var servers: [ServerDiscovery.ServerLookupResponse] = []
@Published var searching = false
override init() {
super.init()
}
func getPublicUsers() {
if ServerEnvironment.current.server != nil {