Add linked ingredients to recipe step (#177)

* Add Compose to app module

* Move Theme to ui module

* Add Coil image loader

* Use Compose for recipe screen

* Save instruction to ingredient relation to DB

* Display ingredients as server formats them

* Display linked ingredients under each step

* Fix ingredients padding

* Show recipe full screen

* Fix recipe screen UI issues

* Hide keyboard on recipe navigation

* Fix loading recipes from DB with no instructions or ingredients

* Add instructions section title

* Add ingredients section title

* Remove unused view holders
This commit is contained in:
Kirill Kamakin
2023-11-07 20:47:01 +01:00
committed by GitHub
parent 5ed1acb678
commit 941d45328e
46 changed files with 797 additions and 730 deletions

View File

@@ -1,6 +1,8 @@
package gq.kirmanak.mealient
import android.app.Application
import coil.Coil
import coil.ImageLoader
import com.google.android.material.color.DynamicColors
import dagger.hilt.android.HiltAndroidApp
import gq.kirmanak.mealient.architecture.configuration.BuildConfiguration
@@ -24,6 +26,9 @@ class App : Application() {
@Inject
lateinit var migrationDetector: MigrationDetector
@Inject
lateinit var imageLoader: ImageLoader
private val appCoroutineScope = CoroutineScope(Dispatchers.Main + Job())
override fun onCreate() {
@@ -31,5 +36,6 @@ class App : Application() {
logger.v { "onCreate() called" }
DynamicColors.applyToActivitiesIfAvailable(this)
appCoroutineScope.launch { migrationDetector.executeMigrations() }
Coil.setImageLoader(imageLoader)
}
}