Menu

A native sheet that stayed open after navigation in PAM Native, and the 1.54.15 fix
📰

A native sheet that stayed open after navigation in PAM Native, and the 1.54.15 fix

DEV Community: php·David William Balbino·4 days ago
#HpnQ3Unh
#devto#dev#native#sheet#back
Long article (583 words) — no AI summary yet.
Reading 0:00
15s threshold

I maintain PAM Native, a framework for building Android and iOS apps in typed PHP. PHP describes the UI. Rust reconciles the tree and runs layout. Kotlin and Swift apply the changes to real Android Views and UIKit controls. There is no JavaScript runtime or WebView. This post covers one navigation bug that I fixed in 1.54.15.

The bug

A screen could close a sheet and navigate in the same event. A "close and go to the product" button is a common example. When that happened, the native modal could stay open.

The cause was the order of operations. The departing screen's state was frozen before the sheet's closed state had been committed. As a result, closing a sheet and navigating in the same event could retain an open native modal.

Navigation in PAM Native is declared with named routes:

<?…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.