fix suggested changes
This commit is contained in:
parent
5d96de329f
commit
3235f8046d
|
@ -977,16 +977,16 @@
|
||||||
62C29E9D26D0FE5900C1D2E7 /* Coordinators */ = {
|
62C29E9D26D0FE5900C1D2E7 /* Coordinators */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
|
62C29EA226D1030F00C1D2E7 /* ConnectToServerCoodinator.swift */,
|
||||||
|
6220D0B926D6092100B8E046 /* FilterCoordinator.swift */,
|
||||||
|
62C29EA526D1036A00C1D2E7 /* HomeCoordinator.swift */,
|
||||||
|
6220D0BF26D61C5000B8E046 /* ItemCoordinator.swift */,
|
||||||
|
6220D0B326D5ED8000B8E046 /* LibraryCoordinator.swift */,
|
||||||
|
62C29EA726D103D500C1D2E7 /* LibraryListCoordinator.swift */,
|
||||||
62C29E9E26D1016600C1D2E7 /* MainCoordinator.swift */,
|
62C29E9E26D1016600C1D2E7 /* MainCoordinator.swift */,
|
||||||
62C29EA026D102A500C1D2E7 /* MainTabCoordinator.swift */,
|
62C29EA026D102A500C1D2E7 /* MainTabCoordinator.swift */,
|
||||||
62C29EA226D1030F00C1D2E7 /* ConnectToServerCoodinator.swift */,
|
|
||||||
62C29EA526D1036A00C1D2E7 /* HomeCoordinator.swift */,
|
|
||||||
62C29EA726D103D500C1D2E7 /* LibraryListCoordinator.swift */,
|
|
||||||
6220D0B026D5EC9900B8E046 /* SettingsCoordinator.swift */,
|
|
||||||
6220D0B326D5ED8000B8E046 /* LibraryCoordinator.swift */,
|
|
||||||
6220D0B626D5EE1100B8E046 /* SearchCoordinator.swift */,
|
6220D0B626D5EE1100B8E046 /* SearchCoordinator.swift */,
|
||||||
6220D0B926D6092100B8E046 /* FilterCoordinator.swift */,
|
6220D0B026D5EC9900B8E046 /* SettingsCoordinator.swift */,
|
||||||
6220D0BF26D61C5000B8E046 /* ItemCoordinator.swift */,
|
|
||||||
6220D0C526D62D8700B8E046 /* VideoPlayerCoordinator.swift */,
|
6220D0C526D62D8700B8E046 /* VideoPlayerCoordinator.swift */,
|
||||||
);
|
);
|
||||||
path = Coordinators;
|
path = Coordinators;
|
||||||
|
|
|
@ -44,6 +44,7 @@ struct SettingsView: View {
|
||||||
Spacer()
|
Spacer()
|
||||||
Text(ServerEnvironment.current.server.name ?? "")
|
Text(ServerEnvironment.current.server.name ?? "")
|
||||||
.foregroundColor(.jellyfinPurple)
|
.foregroundColor(.jellyfinPurple)
|
||||||
|
Image(systemName: "chevron.right")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,6 @@
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
import Stinsen
|
import Stinsen
|
||||||
import URLNavigator
|
|
||||||
|
|
||||||
final class AppURLHandler {
|
final class AppURLHandler {
|
||||||
static let deepLinkScheme = "jellyfin"
|
static let deepLinkScheme = "jellyfin"
|
||||||
|
@ -46,7 +45,6 @@ extension AppURLHandler {
|
||||||
guard url.scheme == Self.deepLinkScheme || url.scheme == "widget-extension" else {
|
guard url.scheme == Self.deepLinkScheme || url.scheme == "widget-extension" else {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
print(AppURLHandler.shared.appURLState.allowedScheme(with: url))
|
|
||||||
if AppURLHandler.shared.appURLState.allowedScheme(with: url) {
|
if AppURLHandler.shared.appURLState.allowedScheme(with: url) {
|
||||||
if launchURL == nil {
|
if launchURL == nil {
|
||||||
return processURL(url)
|
return processURL(url)
|
||||||
|
@ -58,8 +56,6 @@ extension AppURLHandler {
|
||||||
}
|
}
|
||||||
|
|
||||||
func processLaunchedURLIfNeeded() {
|
func processLaunchedURLIfNeeded() {
|
||||||
print("!@#!@#!@#!@#!@#!@")
|
|
||||||
print(launchURL)
|
|
||||||
guard let launchURL = launchURL else { return }
|
guard let launchURL = launchURL else { return }
|
||||||
if processDeepLink(url: launchURL) {
|
if processDeepLink(url: launchURL) {
|
||||||
self.launchURL = nil
|
self.launchURL = nil
|
||||||
|
@ -67,7 +63,6 @@ extension AppURLHandler {
|
||||||
}
|
}
|
||||||
|
|
||||||
private func processURL(_ url: URL) -> Bool {
|
private func processURL(_ url: URL) -> Bool {
|
||||||
print("processURL(_ url: URL) -> Bool")
|
|
||||||
if processURLForUser(url: url) {
|
if processURLForUser(url: url) {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
@ -76,15 +71,6 @@ extension AppURLHandler {
|
||||||
}
|
}
|
||||||
|
|
||||||
private func processURLForUser(url: URL) -> Bool {
|
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",
|
guard url.host?.lowercased() == "users",
|
||||||
url.pathComponents[safe: 1]?.isEmpty == false else { return false }
|
url.pathComponents[safe: 1]?.isEmpty == false else { return false }
|
||||||
|
|
||||||
|
@ -92,7 +78,6 @@ extension AppURLHandler {
|
||||||
if url.pathComponents[safe: 2]?.lowercased() == "items",
|
if url.pathComponents[safe: 2]?.lowercased() == "items",
|
||||||
let itemID = url.pathComponents[safe: 3]
|
let itemID = url.pathComponents[safe: 3]
|
||||||
{
|
{
|
||||||
print("Passed!@#")
|
|
||||||
router?.route(to: .item(viewModel: .init(id: itemID)))
|
router?.route(to: .item(viewModel: .init(id: itemID)))
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,10 +30,6 @@ final class ConnectToServerViewModel: ViewModel {
|
||||||
@Published var servers: [ServerDiscovery.ServerLookupResponse] = []
|
@Published var servers: [ServerDiscovery.ServerLookupResponse] = []
|
||||||
@Published var searching = false
|
@Published var searching = false
|
||||||
|
|
||||||
override init() {
|
|
||||||
super.init()
|
|
||||||
}
|
|
||||||
|
|
||||||
func getPublicUsers() {
|
func getPublicUsers() {
|
||||||
if ServerEnvironment.current.server != nil {
|
if ServerEnvironment.current.server != nil {
|
||||||
LogManager.shared.log.debug("Attempting to read public users from \(ServerEnvironment.current.server.baseURI!)",
|
LogManager.shared.log.debug("Attempting to read public users from \(ServerEnvironment.current.server.baseURI!)",
|
||||||
|
|
Loading…
Reference in New Issue