mirror of
https://github.com/bitwarden/android.git
synced 2024-10-31 23:25:45 +03:00
Make all "...Args" classes into data classes (#455)
This commit is contained in:
parent
8852ae9a40
commit
5ec810d4d6
4 changed files with 4 additions and 4 deletions
|
@ -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],
|
||||||
|
|
|
@ -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(
|
||||||
|
|
|
@ -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,
|
||||||
)
|
)
|
||||||
|
|
|
@ -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(
|
||||||
|
|
Loading…
Reference in a new issue