mirror of
https://git.undefined-dev.fr/Blendman974/faceclaw.git
synced 2026-11-19 21:03:09 +00:00
14 lines
566 B
TypeScript
14 lines
566 B
TypeScript
import { NavigatedData, Page } from "@nativescript/core";
|
|
|
|
import { ConfigViewModel } from "./config-view-model";
|
|
|
|
export function navigatingTo(args: NavigatedData): void {
|
|
const page = args.object as Page;
|
|
// Preserve the model across back-navigation (returning from the firmware
|
|
// check page) so the onboarding "Continue" flow isn't lost.
|
|
if (!page.bindingContext) {
|
|
const context = (args.context as { onboarding?: boolean } | undefined) ?? undefined;
|
|
page.bindingContext = new ConfigViewModel({ onboarding: context?.onboarding ?? false });
|
|
}
|
|
}
|