Keep screen on and update docs (#179)

* Extract recipe screen components

* Keep screen on while recipe is shown

* Update screenshots

* Add release note
This commit is contained in:
Kirill Kamakin
2023-11-11 13:35:15 +01:00
committed by GitHub
parent 3941ceb743
commit 7867e2426d
15 changed files with 429 additions and 291 deletions

View File

@@ -0,0 +1,14 @@
package gq.kirmanak.mealient.extensions
import android.app.Activity
import android.content.Context
import android.content.ContextWrapper
fun Context.findActivity(): Activity? {
var context = this
while (context is ContextWrapper) {
if (context is Activity) return context
context = context.baseContext
}
return null
}