IceCubesApp/Packages/Env
Nathan Reed 8038e8e6af
Improve deep link handling on cold start (#2026)
Previously, if the app was not already running when the Safari action extension was used to open a post in the app, the post would open in the in-app Safari instead of using the Ice Cubes UI.
The action extension only worked well if Ice Cubes was already running but backgrounded when it was used.
This was because of the `hasConnection(with:)` check used to ensure that the current server has a federation relationship with the server the post is on.
Early in app launch, the list of federated peers has not come back from the API request yet, so `hasConnection(with:)` was always returning `false`.

To fix, issue a request to fetch the peers as part of the URL handling process, before checking `hasConnection(with:)` to make the final navigation decision.
As an optimization, only do this if `hasConnection(with:)` returns `false` initially -- if it returns `true`, we already know a connection exists so no need to check again.
2024-04-02 08:26:58 +02:00
..
.swiftpm/xcode/xcshareddata/xcschemes Upgrade to Swift tools version 5.9 + strict Swift concurrency everywhere 2023-09-15 12:46:15 +02:00
Sources/Env Improve deep link handling on cold start (#2026) 2024-04-02 08:26:58 +02:00
Tests format . 2024-02-14 12:48:14 +01:00
.gitignore Quick look support for media preview 2022-12-22 10:53:36 +01:00
Package.swift Add tests for Router 2024-01-01 09:48:53 +01:00
README.md Quick look support for media preview 2022-12-22 10:53:36 +01:00

Env

A description of this package.