LuK1337 changed the topic of #titandev to: Loliés! | *yiff* | https://libera.irclog.whitequark.org/titandev
whitekidney has joined #titandev
<luca020400> I forgot kotlin
<luca020400> Make all the preferences lateinit?
<luca020400> You're doing bit of both, and seeing the !! and ? checks don't make it better
<luca020400> I'm quite sure they will always be valid when you call them
<LuK1337> well i have strategic !! and ?.
<LuK1337> you see I'm removing some categories
<LuK1337> so i use ?. for prefs that are there
<luca020400> If you remove them from Prefs the object is still valid I'm quite sure
<luca020400> It doesn't get garbage collected
<LuK1337> not if i remove the category before i find it
<luca020400> Ah
<luca020400> Anyways, I don't think they are null?
<luca020400> findPreference can return null if the key doesn't exist
<luca020400> But it surely does for you
<LuK1337> they were null in java
<luca020400> I'm quite sure if you remove the parent the child key stil returns the proper object
<LuK1337> i switched alwaysOnDisplayPreference to lateinit tho
<LuK1337> because that won't be null