Bryan Herbst
04/14/2021, 2:28 PMDaniele Segato
12/05/2022, 9:11 AMDaniele Segato
12/05/2022, 9:13 AMval autofillNode = AutofillNode(onFill = onFill, autofillTypes = autofillTypes)
why isn't this in a remember?
val autofillTree = LocalAutofillTree.current
autofillTree += autofillNode
shouldn't this be in some kind of side effect? (ex. DisposableEffect / LaunchedEffect)Bryan Herbst
12/05/2022, 3:15 PMwhy isn’t this in a remember?You could, but you don’t need to (there’s no state there) and in practice I suspect you won’t get much in terms of any sort of performance improvement either since the
onFill
lambda won’t be stable.
shouldn’t this be in some kind of side effect? (ex. DisposableEffect / LaunchedEffect)Maybe? See above with respect to
onFill
- I haven’t experimented with lambdas as a key to an effect, but you need to make sure to create a new node whenever the parameters change. I see where you are going though - we never remove old nodes from the tree.
I took the guts of that modifier from the AndroidX sample, so I don’t have all the answers there.
Username / password are autocompleted but when I perform a login it doesn’t propose to save those.I’ve been encouraging folks to file bugs like this on the issue tracker - I’ve heard this frequently enough that it is obvious there are some issues here that Google needs to address. There are a few open issues that you could chime in on, or open your own: • https://issuetracker.google.com/issues/176949051 • https://issuetracker.google.com/issues/237190742 And it looks like there’s some internal nudging to make progress on these APIs: https://issuetracker.google.com/issues/261422380
Daniele Segato
12/05/2022, 3:58 PMBryan Herbst
12/05/2022, 4:19 PM