generated from bitwarden/template
-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Display a descriptive error when import fails (#122)
- Loading branch information
1 parent
f695254
commit 2640d28
Showing
12 changed files
with
114 additions
and
72 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
22 changes: 22 additions & 0 deletions
22
...tlin/com/bitwarden/authenticator/data/platform/manager/imports/model/ExportParseResult.kt
This file contains 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,22 @@ | ||
package com.bitwarden.authenticator.data.platform.manager.imports.model | ||
|
||
import com.bitwarden.authenticator.data.authenticator.datasource.disk.entity.AuthenticatorItemEntity | ||
import com.bitwarden.authenticator.ui.platform.base.util.Text | ||
|
||
/** | ||
* Represents the result of parsing an export file. | ||
*/ | ||
sealed class ExportParseResult { | ||
|
||
/** | ||
* Indicates the selected file has been successfully parsed. | ||
*/ | ||
data class Success(val items: List<AuthenticatorItemEntity>) : ExportParseResult() | ||
|
||
/** | ||
* Indicates there was an error while parsing the selected file. | ||
* | ||
* @property message User friendly message displayed to the user, if provided. | ||
*/ | ||
data class Error(val message: Text? = null) : ExportParseResult() | ||
} |
4 changes: 3 additions & 1 deletion
4
...otlin/com/bitwarden/authenticator/data/platform/manager/imports/model/ImportDataResult.kt
This file contains 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 |
---|---|---|
@@ -1,10 +1,12 @@ | ||
package com.bitwarden.authenticator.data.platform.manager.imports.model | ||
|
||
import com.bitwarden.authenticator.ui.platform.base.util.Text | ||
|
||
/** | ||
* Represents the result of a data import operation. | ||
*/ | ||
sealed class ImportDataResult { | ||
data object Success : ImportDataResult() | ||
|
||
data object Error : ImportDataResult() | ||
data class Error(val message: Text? = null) : ImportDataResult() | ||
} |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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