Skip to content

Commit

Permalink
Refactor: fixed some suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
Nagarjuna0033 committed Feb 6, 2025
1 parent 78a69d5 commit 889a8cb
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ private fun LoginScreen(
modifier = modifier
.fillMaxSize()
.padding(paddingValues),
createAccount = { navigateToRegisterScreen() },
createAccount = navigateToRegisterScreen,
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ import org.mifospay.core.common.DataState
private const val KEY_STATE = "state"

class LoginViewModel(
private val userAuthRepositoryImp: UserAuthRepository,
private val clientRepositoryImp: ClientRepository,
private val userAuthRepositoryImpl: UserAuthRepository,
private val clientRepositoryImpl: ClientRepository,
private val userPreferencesRepositoryImpl: UserPreferencesRepository,
savedStateHandle: SavedStateHandle,
) : BaseViewModel<LoginState, LoginEvent, LoginAction>(
Expand Down Expand Up @@ -116,7 +116,7 @@ class LoginViewModel(
}

viewModelScope.launch {
val result = userAuthRepositoryImp.login(username, password)
val result = userAuthRepositoryImpl.login(username, password)
sendAction(LoginAction.Internal.ReceiveLoginResult(result))
}
}
Expand All @@ -127,7 +127,7 @@ class LoginViewModel(
private fun loadClient() {
viewModelScope.launch {
try {
val client = clientRepositoryImp.loadClient().firstOrNull()
val client = clientRepositoryImpl.loadClient().firstOrNull()
if (client != null && client.data?.pageItems?.isEmpty() != false) {
val clientId = client.data?.pageItems?.get(0)?.id?.toLong()
val clientName = client.data?.pageItems?.get(0)?.displayName
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import org.mifospay.core.common.DataState
private const val KEY_STATE = "verification_state"

class RegistrationVerificationViewModel(
private val userAuthRepositoryImp: UserAuthRepository,
private val userAuthRepositoryImpl: UserAuthRepository,
savedStateHandle: SavedStateHandle,
) : BaseViewModel<VerificationState, VerificationEvent, VerificationAction>(
initialState = savedStateHandle[KEY_STATE] ?: VerificationState(),
Expand Down Expand Up @@ -89,7 +89,7 @@ class RegistrationVerificationViewModel(
private fun verifyUser() {
viewModelScope.launch {
try {
userAuthRepositoryImp.verifyUser(
userAuthRepositoryImpl.verifyUser(
authenticationToken =
state.authenticationToken,
requestId = state.requestId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ import org.mifospay.core.common.DataState
private const val KEY_STATE = "signup_state"

class RegistrationViewModel(
private val userAuthRepositoryImp: UserAuthRepository,
private val userAuthRepositoryImpl: UserAuthRepository,
savedStateHandle: SavedStateHandle,
) : BaseViewModel<SignUpState, SignUpEvent, SignUpAction>(
initialState = savedStateHandle[KEY_STATE] ?: SignUpState(),
Expand Down Expand Up @@ -189,7 +189,7 @@ class RegistrationViewModel(
viewModelScope.launch {
updateState { it.copy(dialogState = SignUpDialog.Loading) }
try {
userAuthRepositoryImp.registerUser(
userAuthRepositoryImpl.registerUser(
accountNumber = state.accountNumber,
authenticationMode = state.authenticationMode,
email = state.emailInput,
Expand Down
2 changes: 0 additions & 2 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ include(":mifos-shared")
include(":mifos-android")


include(":mifos-android")


pluginManagement {
includeBuild("build-logic")
Expand Down

0 comments on commit 889a8cb

Please sign in to comment.