Make all "...Args" classes into data classes (#455)

This commit is contained in:
Brian Yencho 2023-12-29 11:53:13 -06:00 committed by Álison Fernandes
parent 8852ae9a40
commit 5ec810d4d6
4 changed files with 4 additions and 4 deletions

View file

@ -17,7 +17,7 @@ private const val LOGIN_ROUTE: String = "login/{$EMAIL_ADDRESS}?$CAPTCHA_TOKEN={
* Class to retrieve login arguments from the [SavedStateHandle]. * Class to retrieve login arguments from the [SavedStateHandle].
*/ */
@OmitFromCoverage @OmitFromCoverage
class LoginArgs(val emailAddress: String, val captchaToken: String?) { data class LoginArgs(val emailAddress: String, val captchaToken: String?) {
constructor(savedStateHandle: SavedStateHandle) : this( constructor(savedStateHandle: SavedStateHandle) : this(
checkNotNull(savedStateHandle[EMAIL_ADDRESS]) as String, checkNotNull(savedStateHandle[EMAIL_ADDRESS]) as String,
savedStateHandle[CAPTCHA_TOKEN], savedStateHandle[CAPTCHA_TOKEN],

View file

@ -24,7 +24,7 @@ private const val ADD_EDIT_ITEM_ROUTE: String =
* Class to retrieve vault add & edit arguments from the [SavedStateHandle]. * Class to retrieve vault add & edit arguments from the [SavedStateHandle].
*/ */
@OmitFromCoverage @OmitFromCoverage
class VaultAddEditItemArgs( data class VaultAddEditItemArgs(
val vaultAddEditType: VaultAddEditType, val vaultAddEditType: VaultAddEditType,
) { ) {
constructor(savedStateHandle: SavedStateHandle) : this( constructor(savedStateHandle: SavedStateHandle) : this(

View file

@ -17,7 +17,7 @@ private const val VAULT_ITEM_ROUTE = "$VAULT_ITEM_PREFIX/{$VAULT_ITEM_ID}"
* Class to retrieve vault item arguments from the [SavedStateHandle]. * Class to retrieve vault item arguments from the [SavedStateHandle].
*/ */
@OmitFromCoverage @OmitFromCoverage
class VaultItemArgs(val vaultItemId: String) { data class VaultItemArgs(val vaultItemId: String) {
constructor(savedStateHandle: SavedStateHandle) : this( constructor(savedStateHandle: SavedStateHandle) : this(
checkNotNull(savedStateHandle[VAULT_ITEM_ID]) as String, checkNotNull(savedStateHandle[VAULT_ITEM_ID]) as String,
) )

View file

@ -28,7 +28,7 @@ private const val VAULT_ITEM_LISTING_ROUTE: String =
* Class to retrieve vault item listing arguments from the [SavedStateHandle]. * Class to retrieve vault item listing arguments from the [SavedStateHandle].
*/ */
@OmitFromCoverage @OmitFromCoverage
class VaultItemListingArgs( data class VaultItemListingArgs(
val vaultItemListingType: VaultItemListingType, val vaultItemListingType: VaultItemListingType,
) { ) {
constructor(savedStateHandle: SavedStateHandle) : this( constructor(savedStateHandle: SavedStateHandle) : this(