Skip to content

Fix crash on state reset when preferences are queried#418

Open
marcprux wants to merge 1 commit into
mainfrom
rememberSaveablePreference
Open

Fix crash on state reset when preferences are queried#418
marcprux wants to merge 1 commit into
mainfrom
rememberSaveablePreference

Conversation

@marcprux
Copy link
Copy Markdown
Member

@marcprux marcprux commented May 8, 2026

This consolidates the logic for remembering preferences, and also handled potential null values which can come from the state being reset.

Fixes #417. Fixes #300.

@marcprux
Copy link
Copy Markdown
Member Author

marcprux commented May 9, 2026

As mentioned at #417 (comment), we don't see this in Showcase due to skiptools/skipapp-showcase@5bb3049#diff-e7075a061fc36788a2762feb445a61db436a6f07c529859334189e53914a04f7R53 which adds to Main.kt:

SideEffect { saveableStateHolder.removeState(true) }

I wonder if we should be adding that to every project's Main.kt, @aabewhite?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

1 participant