Skip to content

Commit

Permalink
Merge pull request #90 from sheikh-20/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
sheikh-20 authored Jun 26, 2024
2 parents 563b5e0 + abacc17 commit 43d3385
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ android {
applicationId = "com.application.moviesapp"
minSdk = 24
targetSdk = 33
versionCode = 22
versionName = "1.0.21"
versionCode = 23
versionName = "1.0.22"

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1049,7 +1049,7 @@ fun CommentsCompose(modifier: Modifier = Modifier,
contentPadding = PaddingValues(horizontal = 16.dp),
) {

items(userReviewFlow.itemCount) { index ->
items(userReviewFlow.itemCount.until(2).last) { index ->
CommentsPeopleCompose(review = userReviewFlow[index] ?: return@items)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ import com.application.moviesapp.ui.onboarding.component.SocialLoginComponent
import com.application.moviesapp.ui.theme.MoviesAppTheme
import com.application.moviesapp.ui.viewmodel.OnboardUIState
import com.google.firebase.auth.AuthResult
import com.google.firebase.auth.FirebaseAuthInvalidCredentialsException
import com.google.firebase.auth.FirebaseAuthInvalidUserException
import kotlinx.coroutines.flow.SharedFlow
import kotlinx.coroutines.flow.collectLatest
Expand Down Expand Up @@ -116,7 +117,11 @@ fun LoginWithPasswordScreen(modifier: Modifier = Modifier,
isLoading = false
if (it.throwable is FirebaseAuthInvalidUserException) {
snackbarHostState.showSnackbar(message = "Email does not exists, Try signup!")
} else {
}
else if (it.throwable is FirebaseAuthInvalidCredentialsException) {
snackbarHostState.showSnackbar(message = "Incorrect email or password")
}
else {
snackbarHostState.showSnackbar(message = "Failure!")
Timber.tag("Login").e(it.throwable)
}
Expand Down Expand Up @@ -185,6 +190,7 @@ fun LoginWithPasswordScreen(modifier: Modifier = Modifier,
shape = RoundedCornerShape(50)
)
.fillMaxWidth(),
enabled = email.contains("@") && password.isNotEmpty(),
colors = ButtonDefaults.filledTonalButtonColors(containerColor = Color.Red)) {

if (isLoading) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ fun SignupWithPasswordScreen(modifier: Modifier = Modifier,
shape = RoundedCornerShape(50)
)
.fillMaxWidth(),
enabled = isTermsConditions,
enabled = isTermsConditions && email.contains("@") && password.isNotEmpty(),
colors = ButtonDefaults.filledTonalButtonColors(containerColor = Color.Red)) {

if (isLoading) {
Expand Down

0 comments on commit 43d3385

Please sign in to comment.