Skip to content

Fix/login button#592

Open
Shahd-Hatem wants to merge 2 commits into
developfrom
fix/login-button
Open

Fix/login button#592
Shahd-Hatem wants to merge 2 commits into
developfrom
fix/login-button

Conversation

@Shahd-Hatem

Copy link
Copy Markdown
Contributor

No description provided.

@github-actions

Copy link
Copy Markdown

Test Results

  144 files    144 suites   3m 4s ⏱️
  826 tests   825 ✅ 0 💤 1 ❌
1 530 runs  1 528 ✅ 0 💤 2 ❌

For more details on these failures, see this check.

Results for commit 3ebf4f6.

Comment on lines +51 to +64
val currentUsername = screenState.value.username
val currentPassword = screenState.value.password

if (currentUsername.isBlank() && currentPassword.isBlank()) {
return
}

if (currentUsername == lastTriedUsername && currentPassword == lastTriedPassword) {
return
}

lastTriedUsername = currentUsername
lastTriedPassword = currentPassword

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why don't you just add these to a validator class, because the current implementation the user will not be able to know what is happening when press on the login button because nothing will happen and we should display an error message or something to tell the user the user name or the password is empty.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also another question what if the user entered the user name and the password correctly but the request failed for some reason like because bad internet connection in this way he will not be able to try again because of the lastTriedUsername and the lastTriedPassword

so if we want to do that we should set these variables when we only get the wrong credentials error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants