Skip to content

Commit

Permalink
KMM :: Internal :: Sample app fixes and improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
franmontiel committed Oct 2, 2023
1 parent 789cdaf commit e4cb10c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package com.mobilejazz.kmmsample.core

import com.harmony.kotlin.common.logger.Logger
import com.harmony.kotlin.data.datasource.cache.CacheSQLConfiguration
import com.mobilejazz.kmmsample.core.common.dispatcher
import com.mobilejazz.kmmsample.core.feature.hackerposts.HackerNewsPostsComponent
import com.mobilejazz.kmmsample.core.feature.hackerposts.HackerNewsPostsDefaultModule
import com.mobilejazz.kmmsample.core.screen.mvi.ViewModelComponent
Expand All @@ -11,6 +10,7 @@ import com.mobilejazz.kmmsample.core.screen.mvp.PresenterComponent
import com.mobilejazz.kmmsample.core.screen.mvp.PresenterDefaultModule
import io.ktor.client.engine.HttpClientEngine
import kotlinx.coroutines.CoroutineDispatcher
import kotlinx.coroutines.Dispatchers
import kotlinx.serialization.cbor.Cbor

interface ApplicationComponent {
Expand All @@ -25,7 +25,7 @@ class ApplicationDefaultModule(
private val cacheSQLConfiguration: CacheSQLConfiguration,
) : ApplicationComponent {
private val coroutineDispatcher: CoroutineDispatcher by lazy {
dispatcher()
Dispatchers.Default
}

private val networkComponent by lazy {
Expand Down
6 changes: 5 additions & 1 deletion sample-ios/Sample/AppProvider.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@ protocol DependencyInjection {
}

class AppProvider: DependencyInjection {
lazy var shared: ApplicationComponent = ApplicationDefaultModule(coreLogger: IOSConsoleLogger())
lazy var shared: ApplicationComponent = ApplicationDefaultModule(
coreLogger: IOSConsoleLogger(),
cacheSQLConfiguration: CacheSQLNativeDefaultConfiguration()
)

}

extension AppProvider {
Expand Down

0 comments on commit e4cb10c

Please sign in to comment.