-
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.
feat 온보딩-선택지 제공 화면에서 내가 참여한 미션 조회 구현
- Loading branch information
eshc123
committed
Aug 12, 2024
1 parent
7a3ed05
commit 94c2b0f
Showing
15 changed files
with
261 additions
and
73 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
16 changes: 16 additions & 0 deletions
16
.../src/main/java/com/goalpanzi/mission_mate/core/domain/usecase/GetJoinedMissionsUseCase.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,16 @@ | ||
package com.goalpanzi.mission_mate.core.domain.usecase | ||
|
||
import com.goalpanzi.mission_mate.core.domain.repository.OnboardingRepository | ||
import com.luckyoct.core.model.base.NetworkResult | ||
import com.luckyoct.core.model.response.MissionsResponse | ||
import kotlinx.coroutines.flow.Flow | ||
import kotlinx.coroutines.flow.flow | ||
import javax.inject.Inject | ||
|
||
class GetJoinedMissionsUseCase @Inject constructor( | ||
private val onboardingRepository: OnboardingRepository | ||
) { | ||
operator fun invoke(): Flow<NetworkResult<MissionsResponse>> = flow { | ||
emit(onboardingRepository.getJoinedMissions()) | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
core/model/src/main/java/com/luckyoct/core/model/response/MissionResponse.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,9 @@ | ||
package com.luckyoct.core.model.response | ||
|
||
import kotlinx.serialization.Serializable | ||
|
||
@Serializable | ||
data class MissionResponse( | ||
val missionId : Long, | ||
val description : String | ||
) |
9 changes: 9 additions & 0 deletions
9
core/model/src/main/java/com/luckyoct/core/model/response/MissionsResponse.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,9 @@ | ||
package com.luckyoct.core.model.response | ||
|
||
import kotlinx.serialization.Serializable | ||
|
||
@Serializable | ||
data class MissionsResponse( | ||
val profile : ProfileResponse, | ||
val missions : List<MissionResponse> | ||
) |
9 changes: 9 additions & 0 deletions
9
core/model/src/main/java/com/luckyoct/core/model/response/ProfileResponse.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,9 @@ | ||
package com.luckyoct.core.model.response | ||
|
||
import kotlinx.serialization.Serializable | ||
|
||
@Serializable | ||
data class ProfileResponse( | ||
val nickname : String, | ||
val characterType : String | ||
) |
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
File renamed without changes.
File renamed without changes.
8 changes: 8 additions & 0 deletions
8
...rc/main/java/com/goalpanzi/mission_mate/feature/onboarding/model/OnboardingResultEvent.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,8 @@ | ||
package com.goalpanzi.mission_mate.feature.onboarding.model | ||
|
||
import com.luckyoct.core.model.response.MissionResponse | ||
|
||
sealed class OnboardingResultEvent { | ||
data class SuccessWithJoinedMissions(val mission : MissionResponse) : OnboardingResultEvent() | ||
data object Error : OnboardingResultEvent() | ||
} |
8 changes: 8 additions & 0 deletions
8
...rding/src/main/java/com/goalpanzi/mission_mate/feature/onboarding/model/ProfileUiModel.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,8 @@ | ||
package com.goalpanzi.mission_mate.feature.onboarding.model | ||
|
||
import com.luckyoct.core.model.response.ProfileResponse | ||
|
||
sealed class OnboardingUiModel { | ||
data object Loading : OnboardingUiModel() | ||
data class Success(val profileResponse: ProfileResponse) : OnboardingUiModel() | ||
} |
Oops, something went wrong.