New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Android: Convert Settings to Kotlin #11662
Conversation
Getting serializables without explicitly stating the type is deprecated in Android 13. However we still need a way to get a serializable in versions below that. Now with these we can avoid repeating the same if block.
|
The enum class listings are really long after translation to Kotlin. Do they have to be formatted like that? |
|
If you try to put them in one line and then use the built in formatting, then only the ones that reach the character limit will be formatted like that. That felt inconsistent so I had them all follow the same pattern. But no they don't have to. |
|
Something we probably should do sooner or later is replace stuff like Also, it seems like SettingsFragmentPresenter has the same problem of setting declarations being overly long. I guess there isn't as much we can do here since almost all of them are longer than one line? |
I'm not sure what you mean. Like replacing instances of
I'll at least check, but in those cases, yes. |
Yes, exactly. Sorry if it was unclear. |
|
You're fine, I'm just a little dull. I guess we could do that? It just feels less intuitive to me. I'll push that off to another PR, though. |
|
Reformatted the settings types and the presenter. As expected I couldn't do much about the presenter but a lot were collapsed in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm really not a fan of how the already long SettingsFragmentPresenter is now even longer. But if we're converting everything to Kotlin, I guess that's how it has to be.
I'll merge this after a day or so, in case someone else wants to offer any comments.
|
It would be nice to get this merged, as it's a blocker (kinda) for the work I'm doing in PR #11600... |
Nothing functionally changed here, just swapping to Kotlin.
Apologies in advance for such a large PR. This isn't really something you want to do in smaller chunks because it leads to a lot of annoying clean up later.