mirror of
https://github.com/jonasbark/swiftcontrol.git
synced 2026-11-29 09:11:17 +01:00
The onboarding trainer picker passed the State's own context into connectTrainerFromPicker. Its trial gate opens the Go Pro dialog, whose purchase action opens the paywall drawer -- and that context sits above the Scaffold's DrawerOverlay, so openDrawer's `parentLayer!` threw. In release the user saw only a "Null check operator used on a null value" toast and the paywall never appeared, which on an expired trial leaves no way forward at all. Pass _sheetContext, which lives below the Scaffold. _showPaywall also stops depending on callers getting that right: with no DrawerOverlay ancestor it now falls back to showDialog, which only needs a Navigator. The paywall already constrains and scrolls itself, so it renders correctly either way. The paywall is the last thing that should break when a caller passes the wrong context. Symbolized from a support bundle (chat 197d1f1a, Windows 6.4.3 patch 13): four identical traces seconds apart, each on the Go Pro tap. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>