mirror of
https://github.com/bitwarden/android.git
synced 2025-03-15 18:58:59 +03:00
Make all "...Handlers" classes into data classes (#491)
This commit is contained in:
parent
f2ccfcd59a
commit
2d9b0264f2
6 changed files with 11 additions and 11 deletions
|
@ -1075,7 +1075,7 @@ private fun GeneratorPreview() {
|
|||
* logic when user input is detected.
|
||||
*/
|
||||
@Suppress("LongParameterList")
|
||||
private class PasswordHandlers(
|
||||
private data class PasswordHandlers(
|
||||
val onPasswordSliderLengthChange: (Int, Boolean) -> Unit,
|
||||
val onPasswordToggleCapitalLettersChange: (Boolean) -> Unit,
|
||||
val onPasswordToggleLowercaseLettersChange: (Boolean) -> Unit,
|
||||
|
@ -1164,7 +1164,7 @@ private class PasswordHandlers(
|
|||
* Each lambda corresponds to a specific user action, allowing for easy delegation of
|
||||
* logic when user input is detected.
|
||||
*/
|
||||
private class PassphraseHandlers(
|
||||
private data class PassphraseHandlers(
|
||||
val onPassphraseNumWordsCounterChange: (Int) -> Unit,
|
||||
val onPassphraseWordSeparatorChange: (Char?) -> Unit,
|
||||
val onPassphraseCapitalizeToggleChange: (Boolean) -> Unit,
|
||||
|
@ -1217,7 +1217,7 @@ private class PassphraseHandlers(
|
|||
* logic when user input is detected.
|
||||
*/
|
||||
@Suppress("LongParameterList")
|
||||
private class ForwardedEmailAliasHandlers(
|
||||
private data class ForwardedEmailAliasHandlers(
|
||||
val onServiceChange: (ServiceTypeOption) -> Unit,
|
||||
val onAddyIoAccessTokenTextChange: (String) -> Unit,
|
||||
val onAddyIoDomainNameTextChange: (String) -> Unit,
|
||||
|
@ -1331,7 +1331,7 @@ private class ForwardedEmailAliasHandlers(
|
|||
* Each lambda corresponds to a specific user action, allowing for easy delegation of
|
||||
* logic when user input is detected.
|
||||
*/
|
||||
private class PlusAddressedEmailHandlers(
|
||||
private data class PlusAddressedEmailHandlers(
|
||||
val onEmailChange: (String) -> Unit,
|
||||
) {
|
||||
companion object {
|
||||
|
@ -1360,7 +1360,7 @@ private class PlusAddressedEmailHandlers(
|
|||
* Each lambda corresponds to a specific user action, allowing for easy delegation of
|
||||
* logic when user input is detected.
|
||||
*/
|
||||
private class CatchAllEmailHandlers(
|
||||
private data class CatchAllEmailHandlers(
|
||||
val onDomainChange: (String) -> Unit,
|
||||
) {
|
||||
companion object {
|
||||
|
@ -1389,7 +1389,7 @@ private class CatchAllEmailHandlers(
|
|||
* Each lambda corresponds to a specific user action, allowing for easy delegation of
|
||||
* logic when user input is detected.
|
||||
*/
|
||||
private class RandomWordHandlers(
|
||||
private data class RandomWordHandlers(
|
||||
val onCapitalizeChange: (Boolean) -> Unit,
|
||||
val onIncludeNumberChange: (Boolean) -> Unit,
|
||||
) {
|
||||
|
|
|
@ -23,7 +23,7 @@ import com.x8bit.bitwarden.ui.vault.feature.addedit.model.CustomFieldType
|
|||
* @property onCustomFieldValueChange Handles the action when the field's value changes
|
||||
*/
|
||||
@Suppress("LongParameterList")
|
||||
class VaultAddEditCommonHandlers(
|
||||
data class VaultAddEditCommonHandlers(
|
||||
val onNameTextChange: (String) -> Unit,
|
||||
val onFolderTextChange: (String) -> Unit,
|
||||
val onToggleFavorite: (Boolean) -> Unit,
|
||||
|
|
|
@ -26,7 +26,7 @@ import com.x8bit.bitwarden.ui.vault.feature.addedit.VaultAddEditViewModel
|
|||
* @property onCountryTextChange Handles the action when the country text is changed.
|
||||
*/
|
||||
@Suppress("LongParameterList")
|
||||
class VaultAddEditIdentityTypeHandlers(
|
||||
data class VaultAddEditIdentityTypeHandlers(
|
||||
val onTitleSelected: (VaultAddEditState.ViewState.Content.ItemType.Identity.Title) -> Unit,
|
||||
val onFirstNameTextChange: (String) -> Unit,
|
||||
val onMiddleNameTextChange: (String) -> Unit,
|
||||
|
|
|
@ -22,7 +22,7 @@ import com.x8bit.bitwarden.ui.vault.feature.addedit.VaultAddEditViewModel
|
|||
* @property onAddNewUriClick Handles the action when the add new URI button is clicked.
|
||||
*/
|
||||
@Suppress("LongParameterList")
|
||||
class VaultAddEditLoginTypeHandlers(
|
||||
data class VaultAddEditLoginTypeHandlers(
|
||||
val onUsernameTextChange: (String) -> Unit,
|
||||
val onPasswordTextChange: (String) -> Unit,
|
||||
val onUriTextChange: (String) -> Unit,
|
||||
|
|
|
@ -12,7 +12,7 @@ import com.x8bit.bitwarden.ui.vault.feature.item.VaultItemViewModel
|
|||
* @property onCopyCustomTextField
|
||||
* @property onShowHiddenFieldClick
|
||||
*/
|
||||
class VaultCommonItemTypeHandlers(
|
||||
data class VaultCommonItemTypeHandlers(
|
||||
val onRefreshClick: () -> Unit,
|
||||
val onCopyCustomHiddenField: (String) -> Unit,
|
||||
val onCopyCustomTextField: (String) -> Unit,
|
||||
|
|
|
@ -8,7 +8,7 @@ import com.x8bit.bitwarden.ui.vault.feature.item.VaultItemViewModel
|
|||
* items in a vault.
|
||||
*/
|
||||
@Suppress("LongParameterList")
|
||||
class VaultLoginItemTypeHandlers(
|
||||
data class VaultLoginItemTypeHandlers(
|
||||
val onCheckForBreachClick: () -> Unit,
|
||||
val onCopyPasswordClick: () -> Unit,
|
||||
val onCopyUriClick: (String) -> Unit,
|
||||
|
|
Loading…
Add table
Reference in a new issue