mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-26 06:37:33 +00:00
feat(native): share a booking document to TREK and import it into a trip
TREK now appears under "Open in" and in the share sheet for PDFs, calendar entries, Wallet passes and mails (iOS document types, Android VIEW and SEND filters). The native side reads the file (up to 15 MB) and hands it to the UI, which asks which trip it belongs to, upcoming trips first, then opens that trip's booking import with the file already chosen.
This commit is contained in:
@@ -9,6 +9,7 @@ import { installNativeGeolocation } from './geolocation';
|
||||
import { keepOfflineShellFresh } from './offlineShell';
|
||||
import { isNativeApp, isNativeIos } from './platform';
|
||||
import { reportNativeFailure } from './reportFailure';
|
||||
import { startSharedFiles } from './sharedFiles';
|
||||
import { isUnimplemented } from './trekShell';
|
||||
|
||||
/** Long enough that the warm-up never competes with the first screen's requests. */
|
||||
@@ -27,6 +28,8 @@ export function startNativeApp(): void {
|
||||
void checkAppUpdate(fetchServerFeatures);
|
||||
// The app's own location under navigator.geolocation, where the binary has it.
|
||||
void loadNativeCapabilities().then(() => installNativeGeolocation());
|
||||
// Booking documents shared to TREK, waiting for a trip to import into.
|
||||
void startSharedFiles();
|
||||
|
||||
// A tap on the status bar scrolls the list under it back to the top, as in
|
||||
// every iOS app (the status-bar plugin fires statusTap on iOS).
|
||||
|
||||
Reference in New Issue
Block a user