i’m prepping for Q changes. is something like this...
# android
m
i’m prepping for Q changes. is something like this an antipattern?
Copy code
inline val Context.storageRoot: File
    get() = this.getExternalFilesDir(null) ?: run {
        val storageRoot = File(this.filesDir, "storage")
        storageRoot.mkdirs()
        storageRoot
    }
a
If it’s about android Q, then indeed this doesn’t fit this channel. If it is about how you implemented it in Kotlin, you might want to try #codereview instead.
m
Oh my bad, I thought this channel was for discussing the usage of Kotlin on Android.