forked from Yandex-Practicum/practicum-android-diploma
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
aaa4605
commit 9084c72
Showing
11 changed files
with
45 additions
and
110 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 0 additions & 9 deletions
9
app/src/main/java/ru/practicum/android/diploma/domain/AllRegionInteractor.kt
This file was deleted.
Oops, something went wrong.
9 changes: 0 additions & 9 deletions
9
app/src/main/java/ru/practicum/android/diploma/domain/CountryInteractor.kt
This file was deleted.
Oops, something went wrong.
14 changes: 14 additions & 0 deletions
14
app/src/main/java/ru/practicum/android/diploma/domain/FilterInteractor.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package ru.practicum.android.diploma.domain | ||
|
||
import kotlinx.coroutines.flow.Flow | ||
import ru.practicum.android.diploma.domain.models.Country | ||
import ru.practicum.android.diploma.domain.models.Industries | ||
import ru.practicum.android.diploma.domain.models.Region | ||
import ru.practicum.android.diploma.util.ResponseData | ||
|
||
interface FilterInteractor { | ||
suspend fun getCountries(): Flow<ResponseData<List<Country>>> | ||
suspend fun getRegions(id: String): Flow<ResponseData<List<Region>>> | ||
suspend fun getAllRegions(): Flow<ResponseData<List<Region>>> | ||
suspend fun getIndustries(): Flow<ResponseData<List<Industries>>> | ||
} |
9 changes: 0 additions & 9 deletions
9
app/src/main/java/ru/practicum/android/diploma/domain/IndustryInteractor.kt
This file was deleted.
Oops, something went wrong.
9 changes: 0 additions & 9 deletions
9
app/src/main/java/ru/practicum/android/diploma/domain/RegionInteractor.kt
This file was deleted.
Oops, something went wrong.
13 changes: 0 additions & 13 deletions
13
app/src/main/java/ru/practicum/android/diploma/domain/impl/AllRegionInteractorImpl.kt
This file was deleted.
Oops, something went wrong.
13 changes: 0 additions & 13 deletions
13
app/src/main/java/ru/practicum/android/diploma/domain/impl/CountryInteractorImpl.kt
This file was deleted.
Oops, something went wrong.
27 changes: 27 additions & 0 deletions
27
app/src/main/java/ru/practicum/android/diploma/domain/impl/FilterInteractorImpl.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package ru.practicum.android.diploma.domain.impl | ||
|
||
import kotlinx.coroutines.flow.Flow | ||
import ru.practicum.android.diploma.domain.FilterInteractor | ||
import ru.practicum.android.diploma.domain.api.FilterRepository | ||
import ru.practicum.android.diploma.domain.models.Country | ||
import ru.practicum.android.diploma.domain.models.Industries | ||
import ru.practicum.android.diploma.domain.models.Region | ||
import ru.practicum.android.diploma.util.ResponseData | ||
|
||
class FilterInteractorImpl(private val repository: FilterRepository) : FilterInteractor { | ||
override suspend fun getCountries(): Flow<ResponseData<List<Country>>> { | ||
return repository.getCountries() | ||
} | ||
|
||
override suspend fun getRegions(id: String): Flow<ResponseData<List<Region>>> { | ||
return repository.getRegions(id) | ||
} | ||
|
||
override suspend fun getAllRegions(): Flow<ResponseData<List<Region>>> { | ||
return repository.getAllRegions() | ||
} | ||
|
||
override suspend fun getIndustries(): Flow<ResponseData<List<Industries>>> { | ||
return repository.getIndustries() | ||
} | ||
} |
13 changes: 0 additions & 13 deletions
13
app/src/main/java/ru/practicum/android/diploma/domain/impl/IndustryInteractorImpl.kt
This file was deleted.
Oops, something went wrong.
13 changes: 0 additions & 13 deletions
13
app/src/main/java/ru/practicum/android/diploma/domain/impl/RegionInteractorImpl.kt
This file was deleted.
Oops, something went wrong.