diff --git a/auth/src/main/java/org/futo/circles/auth/feature/log_in/LogInFragment.kt b/auth/src/main/java/org/futo/circles/auth/feature/log_in/LogInFragment.kt index a6f945892fa598ad8c03e06774421ef86e344e52..b0be875dfcee95d12dd05cb03b6eabfea703d734 100644 --- a/auth/src/main/java/org/futo/circles/auth/feature/log_in/LogInFragment.kt +++ b/auth/src/main/java/org/futo/circles/auth/feature/log_in/LogInFragment.kt @@ -15,6 +15,7 @@ import org.futo.circles.auth.R import org.futo.circles.auth.databinding.FragmentLogInBinding import org.futo.circles.auth.feature.log_in.switch_user.list.SwitchUsersAdapter import org.futo.circles.auth.feature.log_in.switch_user.list.SwitchUsersViewHolder +import org.futo.circles.auth.model.ForgotPassword import org.futo.circles.auth.model.RemoveUser import org.futo.circles.core.base.CirclesAppConfig import org.futo.circles.core.base.NetworkObserver @@ -119,7 +120,9 @@ class LogInFragment : Fragment(R.layout.fragment_log_in), HasLoadingState { findNavController().navigateSafe(LogInFragmentDirections.toSignUpFragment()) } btnLogin.setOnClickListener { startLogin(false) } - btnForgotPassword.setOnClickListener { startLogin(true) } + btnForgotPassword.setOnClickListener { + withConfirmation(ForgotPassword()) { startLogin(true) } + } } } diff --git a/auth/src/main/java/org/futo/circles/auth/model/ConfirmationType.kt b/auth/src/main/java/org/futo/circles/auth/model/ConfirmationType.kt index c1e5c6799db06ffbab997b9ce1f455e22e0a154b..ac7d8d417757e40b90ef292a5ba92ef4ecc4540b 100644 --- a/auth/src/main/java/org/futo/circles/auth/model/ConfirmationType.kt +++ b/auth/src/main/java/org/futo/circles/auth/model/ConfirmationType.kt @@ -24,11 +24,17 @@ data class LogOut( data class RemoveSession( override val titleRes: Int = R.string.remove_session, override val messageRes: Int = R.string.remove_session_message, - override val positiveButtonRes: Int = org.futo.circles.core.R.string.remove + override val positiveButtonRes: Int = org.futo.circles.core.R.string.remove ) : ConfirmationType(titleRes, messageRes, positiveButtonRes) data class ResetKeys( override val titleRes: Int = R.string.reset_keys, override val messageRes: Int = R.string.reset_keys_message, override val positiveButtonRes: Int = R.string.confirm +) : ConfirmationType(titleRes, messageRes, positiveButtonRes) + +data class ForgotPassword( + override val titleRes: Int = R.string.forgot_password, + override val messageRes: Int = R.string.forgot_password_message, + override val positiveButtonRes: Int = R.string.confirm ) : ConfirmationType(titleRes, messageRes, positiveButtonRes) \ No newline at end of file diff --git a/auth/src/main/res/values/strings.xml b/auth/src/main/res/values/strings.xml index 98e154e56a4a1727d0b3e537378d8da20e43b4b6..a0368d8b476996342e9b164c2d473eccd944ca65 100644 --- a/auth/src/main/res/values/strings.xml +++ b/auth/src/main/res/values/strings.xml @@ -104,6 +104,7 @@ <string name="remove_session_message">In order to sign out from this session you should confirm your auth.</string> <string name="reset_keys">Reset keys</string> <string name="reset_keys_message">Confirm auth to reset keys and enable cross signing</string> + <string name="forgot_password_message">After verifying your email the new password and key backup will be set.\n\nWarning: With a new key backup you will not be able to see all your previous encrypted messages, this action can not be undone.</string> <string name="confirm">Confirm</string> <string name="failed_to_read_qr_code">Failed to read QR code</string> <string name="current_session">Current session</string>