android/2021/08/08/collection-copy #7
Replies: 1 comment 1 reply
-
StateFlow 没有触发更新是因为 mutate 了 list 里面的对象,这个对象还是原来的自己。所以不要 mutate,copy 一个新的对象替换原来的应该就可以了,不需要整个 list 都 copy 一遍 |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
android/%E5%8D%8F%E7%A8%8B/2021/08/08/collection-copy/
修技术之道,日三省吾身 | App Dev & Freelance Thinker & Hacker Growth | 这里是 @道轲(Dorck) 的个人博客,与你一起探寻世界。
https://dorck.cn/android/%E5%8D%8F%E7%A8%8B/2021/08/08/collection-copy/
Beta Was this translation helpful? Give feedback.
All reactions