Skip to content

Commit

Permalink
Clean up kotlin-inject lib
Browse files Browse the repository at this point in the history
  • Loading branch information
ksharma-xyz committed Nov 23, 2024
1 parent c9c8155 commit 26eb9f1
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 66 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import kotlinx.coroutines.flow.debounce
import kotlinx.coroutines.flow.flatMapLatest
import kotlinx.coroutines.flow.flow
import kotlinx.coroutines.flow.update
import me.tatarka.inject.annotations.Inject
import kotlin.time.Duration.Companion.milliseconds
import kotlin.time.Duration.Companion.seconds

Expand All @@ -19,7 +18,6 @@ import kotlin.time.Duration.Companion.seconds
*
* Note: This class should not be Singleton. It should be created per use-case.
*/
@Inject
class NetworkRateLimiter : RateLimiter {

private val triggerFlow = MutableSharedFlow<Unit>(replay = 1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,12 @@ import io.ktor.client.request.get
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.IO
import kotlinx.coroutines.withContext
import me.tatarka.inject.annotations.Inject
import xyz.ksharma.krail.trip.planner.network.api.model.StopFinderResponse
import xyz.ksharma.krail.trip.planner.network.api.model.StopType
import xyz.ksharma.krail.trip.planner.network.api.model.TripResponse
import xyz.ksharma.krail.trip.planner.network.api.service.stop_finder.StopFinderRequestParams
import xyz.ksharma.krail.trip.planner.network.api.service.trip.TripRequestParams

@Inject
class RealTripPlanningService(private val httpClient: HttpClient) : TripPlanningService {

override suspend fun trip(
Expand Down
2 changes: 2 additions & 0 deletions feature/trip-planner/ui/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ kotlin {
implementation(libs.lifecycle.viewmodel.compose)

// TODO - remove once DI added - start
/*
implementation(libs.ktor.client.core)
implementation(libs.ktor.client.cio)
implementation(libs.ktor.client.auth)
Expand All @@ -52,6 +53,7 @@ kotlin {
implementation(libs.ktor.serialization.kotlinx.json)
implementation(libs.kotlinx.datetime)
implementation(libs.slf4j.simple) // Logging
*/
// TODO - remove once DI added - end

api(libs.di.koinComposeViewmodel)
Expand Down

This file was deleted.

0 comments on commit 26eb9f1

Please sign in to comment.