-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #116 from Nexters/release/1.2.0
[Release] v1.2.0 버전 업데이트 - master
- Loading branch information
Showing
73 changed files
with
1,676 additions
and
229 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
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
32 changes: 32 additions & 0 deletions
32
app/src/main/java/com/moya/funch/di/MbtiCollectionModule.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,32 @@ | ||
package com.moya.funch.di | ||
|
||
import com.moya.funch.repository.MbtiCollectionRepository | ||
import com.moya.funch.repository.MbtiCollectionRepositoryImpl | ||
import com.moya.funch.usecase.LoadMbtiCollectionUseCase | ||
import com.moya.funch.usecase.LoadMbtiCollectionUseCaseImpl | ||
import dagger.Binds | ||
import dagger.Module | ||
import dagger.hilt.InstallIn | ||
import dagger.hilt.components.SingletonComponent | ||
import javax.inject.Singleton | ||
|
||
@Module | ||
@InstallIn(SingletonComponent::class) | ||
object MbtiCollectionModule { | ||
|
||
@Module | ||
@InstallIn(SingletonComponent::class) | ||
interface UseCaseBinder { | ||
@Binds | ||
@Singleton | ||
fun bindLoadMbtiCollectionUseCase(useCase: LoadMbtiCollectionUseCaseImpl): LoadMbtiCollectionUseCase | ||
} | ||
|
||
@Module | ||
@InstallIn(SingletonComponent::class) | ||
interface RepositoryBinder { | ||
@Binds | ||
@Singleton | ||
fun bindMbtiCollectionRepository(repository: MbtiCollectionRepositoryImpl): MbtiCollectionRepository | ||
} | ||
} |
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
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
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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
20 changes: 20 additions & 0 deletions
20
core/data/src/main/java/com/moya/funch/repository/MbtiCollectionRepositoryImpl.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,20 @@ | ||
package com.moya.funch.repository | ||
|
||
import com.moya.funch.datasource.local.LocalUserDataSource | ||
import com.moya.funch.entity.Mbti | ||
import javax.inject.Inject | ||
|
||
class MbtiCollectionRepositoryImpl @Inject constructor( | ||
private val localUserDataSource: LocalUserDataSource | ||
) : MbtiCollectionRepository { | ||
override suspend fun addMbtiCollection(): Result<Unit> { | ||
// @Gun Hyung Todo : 추후 데이터 레이어 리팩토링 이후 작업 진행 | ||
return Result.success(Unit) | ||
} | ||
|
||
override suspend fun loadMbtiCollection(): Result<List<Mbti>> { | ||
return localUserDataSource.fetchUserMbtiCollection().mapCatching { mbtiList -> | ||
mbtiList.map { mbti -> Mbti.valueOf(mbti) } | ||
} | ||
} | ||
} |
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
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
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
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
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
Oops, something went wrong.