mirror of
https://github.com/bitwarden/android.git
synced 2026-06-01 10:16:47 -05:00
BIT-2106: Export vault file with password (#1241)
This commit is contained in:
committed by
Álison Fernandes
parent
ee12bd9da5
commit
bf26db1d4f
@@ -272,7 +272,13 @@ class ExportVaultViewModel @Inject constructor(
|
||||
|
||||
viewModelScope.launch {
|
||||
val result = vaultRepository.exportVaultDataToString(
|
||||
format = state.exportFormat.toExportFormat(state.passwordInput),
|
||||
format = state.exportFormat.toExportFormat(
|
||||
password = if (state.exportFormat == ExportVaultFormat.JSON_ENCRYPTED) {
|
||||
state.filePasswordInput
|
||||
} else {
|
||||
state.passwordInput
|
||||
},
|
||||
),
|
||||
)
|
||||
|
||||
sendAction(
|
||||
@@ -308,8 +314,11 @@ class ExportVaultViewModel @Inject constructor(
|
||||
|
||||
mutableStateFlow.update {
|
||||
it.copy(
|
||||
confirmFilePasswordInput = "",
|
||||
dialogState = null,
|
||||
filePasswordInput = "",
|
||||
passwordInput = "",
|
||||
passwordStrengthState = PasswordStrengthState.NONE,
|
||||
exportData = result.vaultData,
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user