-
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 remote-tracking branch 'origin/dev' into feature/implement-onbo…
…arding-api # Conflicts: # feature/main/src/main/java/com/goalpanzi/mission_mate/core/main/component/MainNavHost.kt # feature/onboarding/src/main/java/com/goalpanzi/mission_mate/feature/onboarding/screen/OnboardingScreen.kt
- Loading branch information
Showing
43 changed files
with
906 additions
and
101 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
15 changes: 11 additions & 4 deletions
15
...re/data/repository/LoginRepositoryImpl.kt → ...ore/data/repository/AuthRepositoryImpl.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 |
---|---|---|
@@ -1,18 +1,25 @@ | ||
package com.goalpanzi.mission_mate.core.data.repository | ||
|
||
import com.goalpanzi.mission_mate.core.domain.repository.LoginRepository | ||
import com.goalpanzi.mission_mate.core.domain.repository.AuthRepository | ||
import com.goalpanzi.mission_mate.core.network.service.LoginService | ||
import com.luckyoct.core.model.GoogleLogin | ||
import com.luckyoct.core.model.base.NetworkResult | ||
import com.luckyoct.core.model.request.GoogleLoginRequest | ||
import javax.inject.Inject | ||
|
||
class LoginRepositoryImpl @Inject constructor( | ||
class AuthRepositoryImpl @Inject constructor( | ||
private val loginService: LoginService | ||
): LoginRepository { | ||
): AuthRepository { | ||
|
||
override suspend fun requestGoogleLogin(email: String) = handleResult { | ||
val request = GoogleLoginRequest(email = email) | ||
loginService.requestGoogleLogin(request) | ||
} | ||
|
||
override suspend fun requestLogout(): NetworkResult<Unit> = handleResult { | ||
loginService.requestLogout() | ||
} | ||
|
||
override suspend fun requestAccountDelete(): NetworkResult<Unit> = handleResult { | ||
loginService.requestDeleteAccount() | ||
} | ||
} |
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
7 changes: 7 additions & 0 deletions
7
...e/src/main/java/com/goalpanzi/mission_mate/core/datastore/datasource/DefaultDataSource.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,7 @@ | ||
package com.goalpanzi.mission_mate.core.datastore.datasource | ||
|
||
import kotlinx.coroutines.flow.Flow | ||
|
||
interface DefaultDataSource { | ||
fun clearUserData() : Flow<Unit> | ||
} |
19 changes: 19 additions & 0 deletions
19
...c/main/java/com/goalpanzi/mission_mate/core/datastore/datasource/DefaultDataSourceImpl.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,19 @@ | ||
package com.goalpanzi.mission_mate.core.datastore.datasource | ||
|
||
import androidx.datastore.core.DataStore | ||
import androidx.datastore.preferences.core.Preferences | ||
import androidx.datastore.preferences.core.edit | ||
import kotlinx.coroutines.flow.Flow | ||
import kotlinx.coroutines.flow.flow | ||
import javax.inject.Inject | ||
|
||
class DefaultDataSourceImpl @Inject constructor( | ||
private val dataStore: DataStore<Preferences> | ||
) : DefaultDataSource { | ||
override fun clearUserData(): Flow<Unit> = flow { | ||
dataStore.edit { preferences -> | ||
preferences.clear() | ||
} | ||
emit(Unit) | ||
} | ||
} |
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
10 changes: 10 additions & 0 deletions
10
core/designsystem/src/main/res/drawable/ic_arrow_right.xml
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,10 @@ | ||
<vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:width="20dp" | ||
android:height="20dp" | ||
android:viewportWidth="20" | ||
android:viewportHeight="20"> | ||
<path | ||
android:pathData="M7.736,3.701L13.653,9.406C13.902,9.646 13.902,10.034 13.653,10.274L7.736,15.979C7.376,16.327 6.791,16.327 6.43,15.979C6.07,15.632 6.07,15.068 6.43,14.721L11.492,9.84L6.43,4.96C6.07,4.612 6.07,4.048 6.43,3.701C6.791,3.353 7.376,3.353 7.736,3.701Z" | ||
android:fillColor="#B3B3B3" | ||
android:fillType="evenOdd"/> | ||
</vector> |
Binary file modified
BIN
+94.9 KB
(130%)
core/designsystem/src/main/res/drawable/image_jeju_success.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
18 changes: 18 additions & 0 deletions
18
...main/src/main/java/com/goalpanzi/mission_mate/core/domain/usecase/AccountDeleteUseCase.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,18 @@ | ||
package com.goalpanzi.mission_mate.core.domain.usecase | ||
|
||
import com.goalpanzi.mission_mate.core.datastore.datasource.DefaultDataSource | ||
import com.goalpanzi.mission_mate.core.domain.repository.AuthRepository | ||
import kotlinx.coroutines.flow.first | ||
import kotlinx.coroutines.flow.flow | ||
import javax.inject.Inject | ||
|
||
class AccountDeleteUseCase @Inject constructor( | ||
private val authRepository: AuthRepository, | ||
private val defaultDataSource: DefaultDataSource | ||
) { | ||
operator fun invoke() = flow { | ||
authRepository.requestAccountDelete() | ||
defaultDataSource.clearUserData().first() | ||
emit(Unit) | ||
} | ||
} |
8 changes: 3 additions & 5 deletions
8
core/domain/src/main/java/com/goalpanzi/mission_mate/core/domain/usecase/LoginUseCase.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
18 changes: 18 additions & 0 deletions
18
core/domain/src/main/java/com/goalpanzi/mission_mate/core/domain/usecase/LogoutUseCase.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,18 @@ | ||
package com.goalpanzi.mission_mate.core.domain.usecase | ||
|
||
import com.goalpanzi.mission_mate.core.datastore.datasource.DefaultDataSource | ||
import com.goalpanzi.mission_mate.core.domain.repository.AuthRepository | ||
import kotlinx.coroutines.flow.first | ||
import kotlinx.coroutines.flow.flow | ||
import javax.inject.Inject | ||
|
||
class LogoutUseCase @Inject constructor( | ||
private val authRepository: AuthRepository, | ||
private val defaultDataSource: DefaultDataSource | ||
) { | ||
operator fun invoke() = flow { | ||
authRepository.requestLogout() | ||
defaultDataSource.clearUserData().first() | ||
emit(Unit) | ||
} | ||
} |
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
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.