-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #80 from oguzsout/fix/RecompositionManagementOfSig…
…nUpScreen Fix/recomposition management of sign up screen
- Loading branch information
Showing
10 changed files
with
188 additions
and
161 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
app/src/main/java/com/oguzdogdu/walliescompose/features/signup/PasswordRuleset.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package com.oguzdogdu.walliescompose.features.signup | ||
|
||
import androidx.compose.runtime.Immutable | ||
|
||
@Immutable | ||
data class PasswordRuleSetContainer(val title: Int, val valid: Boolean = false) |
3 changes: 1 addition & 2 deletions
3
app/src/main/java/com/oguzdogdu/walliescompose/features/signup/SignUpScreenEvent.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,9 @@ | ||
package com.oguzdogdu.walliescompose.features.signup | ||
|
||
import androidx.compose.runtime.Stable | ||
import com.oguzdogdu.walliescompose.features.login.signinwithemail.SignInWithEmailEvents | ||
|
||
@Stable | ||
sealed class SignUpScreenEvent { | ||
data object ExecuteValidation: SignUpScreenEvent() | ||
data class ResumeToSignUp(val email: String,val password: String) : SignUpScreenEvent() | ||
data class CheckPasswordRule(val password: String) : SignUpScreenEvent() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 6 additions & 10 deletions
16
app/src/main/java/com/oguzdogdu/walliescompose/features/signup/SignUpScreenState.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,11 @@ | ||
package com.oguzdogdu.walliescompose.features.signup | ||
|
||
import androidx.compose.runtime.Immutable | ||
import androidx.compose.runtime.Stable | ||
import androidx.compose.runtime.mutableStateListOf | ||
import androidx.compose.runtime.snapshots.SnapshotStateList | ||
|
||
@Stable | ||
sealed class SignUpScreenState { | ||
data object Start: SignUpScreenState() | ||
data object UserSignUp : SignUpScreenState() | ||
data class ErrorSignUp(val errorMessage: String) : SignUpScreenState() | ||
data class Loading(val loading:Boolean) : SignUpScreenState() | ||
data class PasswordRuleSet(val ruleSet: List<Pair<String,Boolean>> = emptyList()) : SignUpScreenState() | ||
} | ||
data class SignUpUIState( | ||
val loading: Boolean = false, | ||
val errorMessage: String? = null, | ||
val isSignUp: Boolean = false, | ||
val ruleSet: List<PasswordRuleSetContainer> = emptyList() | ||
) |
Oops, something went wrong.