Skip to content

Commit

Permalink
Try to better handle deep links
Browse files Browse the repository at this point in the history
  • Loading branch information
LaurentTreguier committed Sep 13, 2024
1 parent 415a1a0 commit 0ad6def
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions Fyreplace/Views/Navigation/NavigationProtocol.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,19 @@ extension NavigationProtocol {
func handle(url: URL) {
switch url.path().trimmingPrefix("/") {
case "login", "register":
attemptAuthentication(with: url.fragment() ?? "")
Task {
await attemptAuthentication(with: url.fragment() ?? "")
}

default:
break
}
}

func attemptAuthentication(with randomCode: String) {
private func attemptAuthentication(with randomCode: String) async {
try? await Task.sleep(for: .seconds(0.3))
navigateToSettings()

Task {
try? await Task.sleep(for: .seconds(0.5))
eventBus.send(.randomCode(randomCode))
}
try? await Task.sleep(for: .seconds(0.3))
eventBus.send(.randomCode(randomCode))
}
}

0 comments on commit 0ad6def

Please sign in to comment.