One of the recent commits in the Compose-multiplat...
# compose
v
One of the recent commits in the Compose-multiplatform-ios-android template disables config changes for android:
Copy code
android:configChanges="orientation|screenSize|screenLayout|keyboardHidden|mnc|colorMode|density|fontScale|fontWeightAdjustment|keyboard|layoutDirection|locale|mcc|navigation|smallestScreenSize|touchscreen|uiMode"
Is it our path with CMP app?
🕺🏾 1
❤️ 5
🕺🏽 1
🕺 1
🫢 3
s
Yep https://kotlinlang.slack.com/archives/CJLTWPH7S/p1622217146183800?thread_ts=1622216960.183000&cid=CJLTWPH7S It does come with some situations which might require you to opt-out of this, but I’d say it’s a good thing to start with if you’re doing a pure compose app
🙌 5
🙌🏾 2
v
Interesting. As I understand the activity recreation and whole android.viewmodel to workaround is pure android thing and there nothing like that in iOS. Also that means if we go mvvm we don't need to create our view models through the android viewmodel fabrics to survive the orientation change. View models can be just simple classes (need only to care about scope clearing on view dispose).
👌 4
p
Finally 😃
c
even if you add that snippet to your manifest, you should still know that a config change can still happen that you can't opt out of.
Screenshot 2023-08-03 at 8.14.13 PM.png
p
Dynamic colors change, do Android really needs to kill the Activity for this? Wouldn't a simple event that triggers a recomposition do the job. Anyways, if it happens, I am fine with losing my screen data. If it is relevant I just save it in preferences before hands. But the amount of boilerplate and ceremony we get rid of by skipping config changes is not a joke
c
yeah. im just making a point that you still technically need them. and android 15 could come around and say that "x now creates a config change you can't opt out of" or something. idk I feel like @Alex Vanyo might have thoughts lol
🙁 1
p
When we gonna get rid of that !
d
What about this bug https://issuetracker.google.com/issues/290951841 ? It seems wrongly closed as "Won't Fix" although reads as a regression to me.
👀 1
plus one 2
a
That bug shouldn't have been marked as "won't fix", that is indeed a bug. The fix for it has already been merged (see duplicate in the bug info)
❤️ 3