mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-01-01 20:37:41 +01:00
Naming convention
This commit is contained in:
parent
5d65a290d2
commit
6e9c16a889
@ -72,10 +72,10 @@ import im.vector.app.features.login.LoginWaitForEmailFragment
|
||||
import im.vector.app.features.login.LoginWebFragment
|
||||
import im.vector.app.features.login.terms.LoginTermsFragment
|
||||
import im.vector.app.features.login2.LoginCaptchaFragment2
|
||||
import im.vector.app.features.login2.LoginFragment2SigninPassword
|
||||
import im.vector.app.features.login2.LoginFragment2SigninUsername
|
||||
import im.vector.app.features.login2.LoginFragment2SignupPassword
|
||||
import im.vector.app.features.login2.LoginFragment2SignupUsername
|
||||
import im.vector.app.features.login2.LoginFragmentSigninPassword2
|
||||
import im.vector.app.features.login2.LoginFragmentSigninUsername2
|
||||
import im.vector.app.features.login2.LoginFragmentSignupPassword2
|
||||
import im.vector.app.features.login2.LoginFragmentSignupUsername2
|
||||
import im.vector.app.features.login2.created.AccountCreatedFragment
|
||||
import im.vector.app.features.login2.LoginFragmentToAny2
|
||||
import im.vector.app.features.login2.LoginGenericTextInputFormFragment2
|
||||
@ -84,7 +84,7 @@ import im.vector.app.features.login2.LoginResetPasswordMailConfirmationFragment2
|
||||
import im.vector.app.features.login2.LoginResetPasswordSuccessFragment2
|
||||
import im.vector.app.features.login2.LoginServerSelectionFragment2
|
||||
import im.vector.app.features.login2.LoginServerUrlFormFragment2
|
||||
import im.vector.app.features.login2.LoginSignUpSignInSelectionFragment2
|
||||
import im.vector.app.features.login2.LoginSplashSignUpSignInSelectionFragment2
|
||||
import im.vector.app.features.login2.LoginSsoOnlyFragment2
|
||||
import im.vector.app.features.login2.LoginWaitForEmailFragment2
|
||||
import im.vector.app.features.login2.LoginWebFragment2
|
||||
@ -284,8 +284,8 @@ interface FragmentModule {
|
||||
|
||||
@Binds
|
||||
@IntoMap
|
||||
@FragmentKey(LoginFragment2SigninUsername::class)
|
||||
fun bindLoginFragment2SigninUsername(fragment: LoginFragment2SigninUsername): Fragment
|
||||
@FragmentKey(LoginFragmentSigninUsername2::class)
|
||||
fun bindLoginFragmentSigninUsername2(fragment: LoginFragmentSigninUsername2): Fragment
|
||||
|
||||
@Binds
|
||||
@IntoMap
|
||||
@ -294,18 +294,18 @@ interface FragmentModule {
|
||||
|
||||
@Binds
|
||||
@IntoMap
|
||||
@FragmentKey(LoginFragment2SignupUsername::class)
|
||||
fun bindLoginFragment2SignupUsername(fragment: LoginFragment2SignupUsername): Fragment
|
||||
@FragmentKey(LoginFragmentSignupUsername2::class)
|
||||
fun bindLoginFragmentSignupUsername2(fragment: LoginFragmentSignupUsername2): Fragment
|
||||
|
||||
@Binds
|
||||
@IntoMap
|
||||
@FragmentKey(LoginFragment2SigninPassword::class)
|
||||
fun bindLoginFragment2SigninPassword(fragment: LoginFragment2SigninPassword): Fragment
|
||||
@FragmentKey(LoginFragmentSigninPassword2::class)
|
||||
fun bindLoginFragmentSigninPassword2(fragment: LoginFragmentSigninPassword2): Fragment
|
||||
|
||||
@Binds
|
||||
@IntoMap
|
||||
@FragmentKey(LoginFragment2SignupPassword::class)
|
||||
fun bindLoginFragment2SignupPassword(fragment: LoginFragment2SignupPassword): Fragment
|
||||
@FragmentKey(LoginFragmentSignupPassword2::class)
|
||||
fun bindLoginFragmentSignupPassword2(fragment: LoginFragmentSignupPassword2): Fragment
|
||||
|
||||
@Binds
|
||||
@IntoMap
|
||||
@ -354,8 +354,8 @@ interface FragmentModule {
|
||||
|
||||
@Binds
|
||||
@IntoMap
|
||||
@FragmentKey(LoginSignUpSignInSelectionFragment2::class)
|
||||
fun bindLoginSignUpSignInSelectionFragment2(fragment: LoginSignUpSignInSelectionFragment2): Fragment
|
||||
@FragmentKey(LoginSplashSignUpSignInSelectionFragment2::class)
|
||||
fun bindLoginSplashSignUpSignInSelectionFragment2(fragment: LoginSplashSignUpSignInSelectionFragment2): Fragment
|
||||
|
||||
@Binds
|
||||
@IntoMap
|
||||
|
@ -43,7 +43,9 @@ import im.vector.app.databinding.ActivityLoginBinding
|
||||
import im.vector.app.features.home.HomeActivity
|
||||
import im.vector.app.features.login.LoginCaptchaFragmentArgument
|
||||
import im.vector.app.features.login.LoginConfig
|
||||
import im.vector.app.features.login.LoginGenericTextInputFormFragmentArgument
|
||||
import im.vector.app.features.login.LoginWaitForEmailFragmentArgument
|
||||
import im.vector.app.features.login.TextInputFormFragmentMode
|
||||
import im.vector.app.features.login.isSupported
|
||||
import im.vector.app.features.login.terms.LoginTermsFragmentArgument
|
||||
import im.vector.app.features.login.terms.toLocalizedLoginTerms
|
||||
@ -115,7 +117,7 @@ open class LoginActivity2 : VectorBaseActivity<ActivityLoginBinding>(), ToolbarC
|
||||
}
|
||||
|
||||
protected open fun addFirstFragment() {
|
||||
addFragment(R.id.loginFragmentContainer, LoginSignUpSignInSelectionFragment2::class.java)
|
||||
addFragment(R.id.loginFragmentContainer, LoginSplashSignUpSignInSelectionFragment2::class.java)
|
||||
}
|
||||
|
||||
private fun handleLoginViewEvents(event: LoginViewEvents2) {
|
||||
@ -171,7 +173,7 @@ open class LoginActivity2 : VectorBaseActivity<ActivityLoginBinding>(), ToolbarC
|
||||
}
|
||||
is LoginViewEvents2.OpenSignInEnterIdentifierScreen -> {
|
||||
addFragmentToBackstack(R.id.loginFragmentContainer,
|
||||
LoginFragment2SigninUsername::class.java,
|
||||
LoginFragmentSigninUsername2::class.java,
|
||||
option = { ft ->
|
||||
findViewById<View?>(R.id.loginSplashLogo)?.let { ft.addSharedElement(it, ViewCompat.getTransitionName(it) ?: "") }
|
||||
// Disable transition of text
|
||||
@ -216,19 +218,19 @@ open class LoginActivity2 : VectorBaseActivity<ActivityLoginBinding>(), ToolbarC
|
||||
option = commonOption)
|
||||
is LoginViewEvents2.OpenSigninPasswordScreen -> {
|
||||
addFragmentToBackstack(R.id.loginFragmentContainer,
|
||||
LoginFragment2SigninPassword::class.java,
|
||||
LoginFragmentSigninPassword2::class.java,
|
||||
tag = FRAGMENT_LOGIN_TAG,
|
||||
option = commonOption)
|
||||
}
|
||||
is LoginViewEvents2.OpenSignupPasswordScreen -> {
|
||||
addFragmentToBackstack(R.id.loginFragmentContainer,
|
||||
LoginFragment2SignupPassword::class.java,
|
||||
LoginFragmentSignupPassword2::class.java,
|
||||
tag = FRAGMENT_REGISTRATION_STAGE_TAG,
|
||||
option = commonOption)
|
||||
}
|
||||
is LoginViewEvents2.OpenSignUpChooseUsernameScreen -> {
|
||||
addFragmentToBackstack(R.id.loginFragmentContainer,
|
||||
LoginFragment2SignupUsername::class.java,
|
||||
LoginFragmentSignupUsername2::class.java,
|
||||
tag = FRAGMENT_REGISTRATION_STAGE_TAG,
|
||||
option = commonOption)
|
||||
}
|
||||
|
@ -29,7 +29,7 @@ import com.jakewharton.rxbinding3.widget.textChanges
|
||||
import im.vector.app.R
|
||||
import im.vector.app.core.extensions.hideKeyboard
|
||||
import im.vector.app.core.extensions.showPassword
|
||||
import im.vector.app.databinding.FragmentLogin2SigninPasswordBinding
|
||||
import im.vector.app.databinding.FragmentLoginSigninPassword2Binding
|
||||
import im.vector.app.features.home.AvatarRenderer
|
||||
import io.reactivex.rxkotlin.subscribeBy
|
||||
import org.matrix.android.sdk.api.auth.login.LoginProfileInfo
|
||||
@ -40,18 +40,17 @@ import javax.net.ssl.HttpsURLConnection
|
||||
|
||||
/**
|
||||
* In this screen:
|
||||
* In signin mode:
|
||||
* - the user is asked for password to sign in to a homeserver.
|
||||
* - He also can reset his password
|
||||
*/
|
||||
class LoginFragment2SigninPassword @Inject constructor(
|
||||
class LoginFragmentSigninPassword2 @Inject constructor(
|
||||
private val avatarRenderer: AvatarRenderer
|
||||
) : AbstractSSOLoginFragment2<FragmentLogin2SigninPasswordBinding>() {
|
||||
) : AbstractSSOLoginFragment2<FragmentLoginSigninPassword2Binding>() {
|
||||
|
||||
private var passwordShown = false
|
||||
|
||||
override fun getBinding(inflater: LayoutInflater, container: ViewGroup?): FragmentLogin2SigninPasswordBinding {
|
||||
return FragmentLogin2SigninPasswordBinding.inflate(inflater, container, false)
|
||||
override fun getBinding(inflater: LayoutInflater, container: ViewGroup?): FragmentLoginSigninPassword2Binding {
|
||||
return FragmentLoginSigninPassword2Binding.inflate(inflater, container, false)
|
||||
}
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
@ -25,7 +25,7 @@ import androidx.autofill.HintConstants
|
||||
import com.jakewharton.rxbinding3.widget.textChanges
|
||||
import im.vector.app.R
|
||||
import im.vector.app.core.extensions.hideKeyboard
|
||||
import im.vector.app.databinding.FragmentLogin2SigninUsernameBinding
|
||||
import im.vector.app.databinding.FragmentLoginSigninUsername2Binding
|
||||
import io.reactivex.rxkotlin.subscribeBy
|
||||
import org.matrix.android.sdk.api.failure.Failure
|
||||
import org.matrix.android.sdk.api.failure.MatrixError
|
||||
@ -35,10 +35,10 @@ import javax.inject.Inject
|
||||
* In this screen:
|
||||
* - the user is asked for its matrix ID, and have the possibility to open the screen to select a server
|
||||
*/
|
||||
class LoginFragment2SigninUsername @Inject constructor() : AbstractLoginFragment2<FragmentLogin2SigninUsernameBinding>() {
|
||||
class LoginFragmentSigninUsername2 @Inject constructor() : AbstractLoginFragment2<FragmentLoginSigninUsername2Binding>() {
|
||||
|
||||
override fun getBinding(inflater: LayoutInflater, container: ViewGroup?): FragmentLogin2SigninUsernameBinding {
|
||||
return FragmentLogin2SigninUsernameBinding.inflate(inflater, container, false)
|
||||
override fun getBinding(inflater: LayoutInflater, container: ViewGroup?): FragmentLoginSigninUsername2Binding {
|
||||
return FragmentLoginSigninUsername2Binding.inflate(inflater, container, false)
|
||||
}
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
@ -27,21 +27,21 @@ import com.jakewharton.rxbinding3.widget.textChanges
|
||||
import im.vector.app.R
|
||||
import im.vector.app.core.extensions.hideKeyboard
|
||||
import im.vector.app.core.extensions.showPassword
|
||||
import im.vector.app.databinding.FragmentLogin2SignupPasswordBinding
|
||||
import im.vector.app.databinding.FragmentLoginSignupPassword2Binding
|
||||
import io.reactivex.rxkotlin.Observables
|
||||
import io.reactivex.rxkotlin.subscribeBy
|
||||
import javax.inject.Inject
|
||||
|
||||
/**
|
||||
* In this screen:
|
||||
* - the user is asked for password to sign up to a homeserver.
|
||||
* - the user is asked to choose a password to sign up to a homeserver.
|
||||
*/
|
||||
class LoginFragment2SignupPassword @Inject constructor() : AbstractSSOLoginFragment2<FragmentLogin2SignupPasswordBinding>() {
|
||||
class LoginFragmentSignupPassword2 @Inject constructor() : AbstractSSOLoginFragment2<FragmentLoginSignupPassword2Binding>() {
|
||||
|
||||
private var passwordsShown = false
|
||||
|
||||
override fun getBinding(inflater: LayoutInflater, container: ViewGroup?): FragmentLogin2SignupPasswordBinding {
|
||||
return FragmentLogin2SignupPasswordBinding.inflate(inflater, container, false)
|
||||
override fun getBinding(inflater: LayoutInflater, container: ViewGroup?): FragmentLoginSignupPassword2Binding {
|
||||
return FragmentLoginSignupPassword2Binding.inflate(inflater, container, false)
|
||||
}
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
@ -29,7 +29,7 @@ import com.jakewharton.rxbinding3.widget.textChanges
|
||||
import im.vector.app.R
|
||||
import im.vector.app.core.extensions.hideKeyboard
|
||||
import im.vector.app.core.extensions.toReducedUrl
|
||||
import im.vector.app.databinding.FragmentLogin2SignupUsernameBinding
|
||||
import im.vector.app.databinding.FragmentLoginSignupUsername2Binding
|
||||
import im.vector.app.features.login.LoginMode
|
||||
import im.vector.app.features.login.SocialLoginButtonsView
|
||||
import io.reactivex.rxkotlin.subscribeBy
|
||||
@ -37,17 +37,17 @@ import javax.inject.Inject
|
||||
|
||||
/**
|
||||
* In this screen:
|
||||
* - the user is asked for login to sign up to a homeserver.
|
||||
* - the user is asked for an identifier to sign up to a homeserver.
|
||||
* - SSO option are displayed if available
|
||||
*/
|
||||
class LoginFragment2SignupUsername @Inject constructor() : AbstractSSOLoginFragment2<FragmentLogin2SignupUsernameBinding>() {
|
||||
class LoginFragmentSignupUsername2 @Inject constructor() : AbstractSSOLoginFragment2<FragmentLoginSignupUsername2Binding>() {
|
||||
|
||||
// Temporary patch for https://github.com/vector-im/riotX-android/issues/1410,
|
||||
// waiting for https://github.com/matrix-org/synapse/issues/7576
|
||||
private var isNumericOnlyUserIdForbidden = false
|
||||
|
||||
override fun getBinding(inflater: LayoutInflater, container: ViewGroup?): FragmentLogin2SignupUsernameBinding {
|
||||
return FragmentLogin2SignupUsernameBinding.inflate(inflater, container, false)
|
||||
override fun getBinding(inflater: LayoutInflater, container: ViewGroup?): FragmentLoginSignupUsername2Binding {
|
||||
return FragmentLoginSignupUsername2Binding.inflate(inflater, container, false)
|
||||
}
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
@ -30,7 +30,7 @@ import im.vector.app.R
|
||||
import im.vector.app.core.extensions.hideKeyboard
|
||||
import im.vector.app.core.extensions.showPassword
|
||||
import im.vector.app.core.extensions.toReducedUrl
|
||||
import im.vector.app.databinding.FragmentLogin2SigninToBinding
|
||||
import im.vector.app.databinding.FragmentLoginSigninToAny2Binding
|
||||
import im.vector.app.features.login.LoginMode
|
||||
import im.vector.app.features.login.SocialLoginButtonsView
|
||||
import io.reactivex.Observable
|
||||
@ -47,7 +47,7 @@ import javax.inject.Inject
|
||||
* - He also can reset his password
|
||||
* - It also possible to use SSO if server support it in this screen
|
||||
*/
|
||||
class LoginFragmentToAny2 @Inject constructor() : AbstractSSOLoginFragment2<FragmentLogin2SigninToBinding>() {
|
||||
class LoginFragmentToAny2 @Inject constructor() : AbstractSSOLoginFragment2<FragmentLoginSigninToAny2Binding>() {
|
||||
|
||||
private var passwordShown = false
|
||||
|
||||
@ -55,8 +55,8 @@ class LoginFragmentToAny2 @Inject constructor() : AbstractSSOLoginFragment2<Frag
|
||||
// waiting for https://github.com/matrix-org/synapse/issues/7576
|
||||
private var isNumericOnlyUserIdForbidden = false
|
||||
|
||||
override fun getBinding(inflater: LayoutInflater, container: ViewGroup?): FragmentLogin2SigninToBinding {
|
||||
return FragmentLogin2SigninToBinding.inflate(inflater, container, false)
|
||||
override fun getBinding(inflater: LayoutInflater, container: ViewGroup?): FragmentLoginSigninToAny2Binding {
|
||||
return FragmentLoginSigninToAny2Binding.inflate(inflater, container, false)
|
||||
}
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
|
@ -18,7 +18,6 @@ package im.vector.app.features.login2
|
||||
|
||||
import android.os.Build
|
||||
import android.os.Bundle
|
||||
import android.os.Parcelable
|
||||
import android.text.InputType
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
@ -35,25 +34,13 @@ import im.vector.app.core.extensions.isEmail
|
||||
import im.vector.app.core.extensions.setTextOrHide
|
||||
import im.vector.app.core.extensions.toReducedUrl
|
||||
import im.vector.app.databinding.FragmentLoginGenericTextInputForm2Binding
|
||||
import kotlinx.parcelize.Parcelize
|
||||
import im.vector.app.features.login.LoginGenericTextInputFormFragmentArgument
|
||||
import im.vector.app.features.login.TextInputFormFragmentMode
|
||||
import org.matrix.android.sdk.api.auth.registration.RegisterThreePid
|
||||
import org.matrix.android.sdk.api.failure.Failure
|
||||
import org.matrix.android.sdk.api.failure.is401
|
||||
import javax.inject.Inject
|
||||
|
||||
enum class TextInputFormFragmentMode {
|
||||
SetEmail,
|
||||
SetMsisdn,
|
||||
ConfirmMsisdn
|
||||
}
|
||||
|
||||
@Parcelize
|
||||
data class LoginGenericTextInputFormFragmentArgument(
|
||||
val mode: TextInputFormFragmentMode,
|
||||
val mandatory: Boolean,
|
||||
val extra: String = ""
|
||||
) : Parcelable
|
||||
|
||||
/**
|
||||
* In this screen, the user is asked for a text input
|
||||
*/
|
||||
@ -85,8 +72,8 @@ class LoginGenericTextInputFormFragment2 @Inject constructor() : AbstractLoginFr
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
views.loginGenericTextInputFormTextInput.setAutofillHints(
|
||||
when (params.mode) {
|
||||
TextInputFormFragmentMode.SetEmail -> HintConstants.AUTOFILL_HINT_EMAIL_ADDRESS
|
||||
TextInputFormFragmentMode.SetMsisdn -> HintConstants.AUTOFILL_HINT_PHONE_NUMBER
|
||||
TextInputFormFragmentMode.SetEmail -> HintConstants.AUTOFILL_HINT_EMAIL_ADDRESS
|
||||
TextInputFormFragmentMode.SetMsisdn -> HintConstants.AUTOFILL_HINT_PHONE_NUMBER
|
||||
TextInputFormFragmentMode.ConfirmMsisdn -> HintConstants.AUTOFILL_HINT_SMS_OTP
|
||||
}
|
||||
)
|
||||
|
@ -31,7 +31,7 @@ import javax.inject.Inject
|
||||
* In this screen, the user is asked to sign up or to sign in to the homeserver
|
||||
* This is the new splash screen
|
||||
*/
|
||||
class LoginSignUpSignInSelectionFragment2 @Inject constructor(
|
||||
class LoginSplashSignUpSignInSelectionFragment2 @Inject constructor(
|
||||
private val vectorPreferences: VectorPreferences
|
||||
) : AbstractLoginFragment2<FragmentLoginSplash2Binding>() {
|
||||
|
Loading…
Reference in New Issue
Block a user