Skip to content

Don't load strokes when adding a note on compact screens. - #134

Draft
copybara-service[bot] wants to merge 1 commit into
mainfrom
test_1026439940
Draft

copybara-service[bot] wants to merge 1 commit into
mainfrom
test_1026439940

Conversation

@copybara-service

Copy link
Copy Markdown

Don't load strokes when adding a note on compact screens.

HomeScreenViewModel.addNoteOfType selected every newly added note. On compact screens the Home screen has no detail pane and clears the selection when it returns, so that selection was never shown, yet re-subscribing to uiState still decoded the new note's strokes before the selection was cleared.

Select a newly added note from the Home screen's add callbacks only when the detail pane is visible, matching how tapping an existing note already behaves.

`HomeScreenViewModel.addNoteOfType` selected every newly added note. On compact screens the Home screen has no detail pane and clears the selection when it returns, so that selection was never shown, yet re-subscribing to `uiState` still decoded the new note's strokes before the selection was cleared.

Select a newly added note from the Home screen's add callbacks only when the detail pane is visible, matching how tapping an existing note already behaves.

PiperOrigin-RevId: 1026439940
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant