mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-14 00:01:03 +00:00
fix(native): a widget tap opens its page every time, also after iOS ended the page
A widget or Live Activity tap reached the UI as Capacitor's appUrlOpen, or as the launch URL. When iOS had ended the web view's process in the background, the event went to the old page's listeners and was lost, and the reloaded page found the same link in getLaunchUrl that it had already followed once and skipped it: the second tap on the packing widget opened the start page. The binary now takes com.liketrek.trek://navigate links itself and hands them over like a quick action, held until the UI takes it and kept for a page that is still loading. It reports the feature appLinks, and the UI only follows the link through Capacitor for binaries without it.
This commit is contained in:
@@ -211,9 +211,12 @@ export interface TrekShellPlugin {
|
||||
): Promise<{ remove: () => Promise<void> }>;
|
||||
/** Feature quickActions (iOS): the actions a long press on the app icon shows, in the UI's language. */
|
||||
setQuickActions(options: { items: NativeQuickAction[] }): Promise<void>;
|
||||
/** Feature quickActions: the action the app was launched with, before the UI ran. */
|
||||
/**
|
||||
* Feature quickActions: the action the app was launched with, before the UI ran.
|
||||
* With the feature appLinks also a widget or Live Activity tap, as its path.
|
||||
*/
|
||||
takeQuickAction(): Promise<{ path: string | null }>;
|
||||
/** Feature quickActions: an action chosen while the app was running. */
|
||||
/** Feature quickActions: an action chosen (with appLinks: a widget tapped) while the app was running. */
|
||||
addListener(
|
||||
event: 'quickAction',
|
||||
listener: (payload: { path: string }) => void
|
||||
|
||||
Reference in New Issue
Block a user