Skip to content

Commit

Permalink
#219 SignRepositoryImpl에서 이메일 인증 로직 구현하도록 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
pknujsp committed Mar 11, 2024
1 parent 5d462e9 commit 4229089
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ internal class SignRepositoryImpl(
accountSessionRepository.updateSession(null)
signDataSource.signOut()
}

override suspend fun verifyEmail(email: String, code: String): Result<Boolean> {
return signDataSource.vertifyEmail(email, code)
}
}

sealed interface LoginState {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
package com.android.mediproject.feature.intro

import android.app.Activity
import com.android.mediproject.feature.intro.databinding.DialogEmailVerificationBinding
import com.google.android.material.dialog.MaterialAlertDialogBuilder

fun emailVerificationDialog(activity: Activity, verifyCode: (String) -> Unit, resendCode: () -> Unit) {
val binding = DialogEmailVerificationBinding.inflate(activity.layoutInflater, null, false)
val dialogBuilder = MaterialAlertDialogBuilder(activity).apply {
_binding = FragmentMyPageMoreDialogBinding.inflate(layoutInflater, null, false)
setView(onCreateView(layoutInflater, binding.rootLayout, savedInstanceState))
setView(binding.root)
}

binding.apply {

}
dialogBuilder.create().show()
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,6 @@ import javax.inject.Inject
@HiltViewModel
class VerificationViewModel @Inject constructor(
private val signRepository: SignRepository,
) : BaseViewModel() {}
) : BaseViewModel() {

}
12 changes: 10 additions & 2 deletions feature/intro/src/main/res/layout/dialog_email_verification.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">

<data>

<variable
name="viewModel"
type="com.android.mediproject.feature.intro.IntroViewModel" />

</data>

<LinearLayout
android:id="@+id/rootLayout"
android:layout_width="match_parent"
Expand All @@ -28,9 +36,9 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="16sp"
android:layout_marginTop="25dp"
android:text="@string/verificationCodeDescription"
android:layout_marginTop="25dp" />
android:textSize="16sp" />

<com.android.mediproject.core.ui.base.view.Subtitle
android:id="@+id/dialogSubtitle1"
Expand Down

0 comments on commit 4229089

Please sign in to comment.