-
Notifications
You must be signed in to change notification settings - Fork 1
Refactor: MVVM -> MVI
#45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
a39de57
fix: delete button color on view password screen
JeelDobariya38 758d910
feat: add a state for save password screen
JeelDobariya38 13aff03
refactor: add a onaction function to make code clean for save passwor…
JeelDobariya38 7fc9184
refactor: add a default value for states
JeelDobariya38 ee1c1ea
refactor: add onAction for update password screen
JeelDobariya38 f8a3add
fix: typo in state init, though it compile successfullygit add app/sr…
JeelDobariya38 cd38379
refactor: the view password activity to follow MVI
JeelDobariya38 ca196cc
refactor: the load password activity to follow MVI
JeelDobariya38 a7bf410
refactor: made LoadPasswordAction for all action releated to LoadPass…
JeelDobariya38 d702d9f
fix: inconsitent password issue after upadteing password
JeelDobariya38 5bcd71f
lint: formated & styling, in class & object names
JeelDobariya38 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
5 changes: 5 additions & 0 deletions
5
app/src/main/kotlin/com/jeeldobariya/passcodes/ui/LoadPasswordAction.kt
This file contains hidden or 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,5 @@ | ||
| package com.jeeldobariya.passcodes.ui | ||
|
|
||
| sealed interface LoadPasswordAction { | ||
| data object RefreshPassswordData: LoadPasswordAction | ||
| } |
This file contains hidden or 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
8 changes: 8 additions & 0 deletions
8
app/src/main/kotlin/com/jeeldobariya/passcodes/ui/LoadPasswordState.kt
JeelDobariya38 marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or 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,8 @@ | ||
| package com.jeeldobariya.passcodes.ui | ||
|
|
||
| import com.jeeldobariya.passcodes.database.Password | ||
|
|
||
| data class LoadPasswordState( | ||
| val passwordEntityList: List<Password> = emptyList<Password>(), | ||
| val isError: Boolean = false | ||
| ) |
This file contains hidden or 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
9 changes: 9 additions & 0 deletions
9
app/src/main/kotlin/com/jeeldobariya/passcodes/ui/SavePasswordAction.kt
JeelDobariya38 marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or 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,9 @@ | ||
| package com.jeeldobariya.passcodes.ui | ||
|
|
||
| sealed interface SavePasswordAction { | ||
| data class OnChangeDomain(val newDomain: String): SavePasswordAction | ||
| data class OnChangeUsername(val newUsername: String): SavePasswordAction | ||
| data class OnChangePassword(val newPassword: String): SavePasswordAction | ||
| data class OnChangeNotes(val newNotes: String): SavePasswordAction | ||
| data object OnSavePasswordButtonClick: SavePasswordAction | ||
| } |
This file contains hidden or 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
9 changes: 9 additions & 0 deletions
9
app/src/main/kotlin/com/jeeldobariya/passcodes/ui/SavePasswordState.kt
JeelDobariya38 marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or 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,9 @@ | ||
| package com.jeeldobariya.passcodes.ui | ||
|
|
||
| data class SavePasswordState( | ||
| val domain: String = "", | ||
| val username: String = "", | ||
| val password: String = "", | ||
| val notes: String = "", | ||
| val isError: Boolean = false | ||
| ) |
This file contains hidden or 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
9 changes: 9 additions & 0 deletions
9
app/src/main/kotlin/com/jeeldobariya/passcodes/ui/UpdatePasswordAction.kt
JeelDobariya38 marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or 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,9 @@ | ||
| package com.jeeldobariya.passcodes.ui | ||
|
|
||
| sealed interface UpdatePasswordAction { | ||
| data class OnChangeDomain(val newDomain: String): UpdatePasswordAction | ||
| data class OnChangeUsername(val newUsername: String): UpdatePasswordAction | ||
| data class OnChangePassword(val newPassword: String): UpdatePasswordAction | ||
| data class OnChangeNotes(val newNotes: String): UpdatePasswordAction | ||
| data object OnUpdatePasswordButtonClick: UpdatePasswordAction | ||
| } |
This file contains hidden or 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
9 changes: 9 additions & 0 deletions
9
app/src/main/kotlin/com/jeeldobariya/passcodes/ui/UpdatePasswordState.kt
JeelDobariya38 marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or 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,9 @@ | ||
| package com.jeeldobariya.passcodes.ui | ||
|
|
||
| data class UpdatePasswordState( | ||
| val domain: String = "", | ||
| val username: String = "", | ||
| val password: String = "", | ||
| val notes: String = "", | ||
| val isError: Boolean = false | ||
| ) |
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.