Refactor
This commit is contained in:
parent
536de8a3fa
commit
679922bdfe
2 changed files with 1 additions and 11 deletions
|
@ -20,8 +20,6 @@
|
|||
"codeIssuerHint": "Issuer",
|
||||
"codeSecretKeyHint": "Secret Key",
|
||||
"codeAccountHint": "Account (you@domain.com)",
|
||||
"digitsAccountHint": "Digits (default=6)",
|
||||
"accountKeyType": "Type of key",
|
||||
"sessionExpired": "Session expired",
|
||||
"@sessionExpired": {
|
||||
"description": "Title of the dialog when the users current session is invalid/expired"
|
||||
|
|
|
@ -157,14 +157,6 @@ class _SetupEnterSecretKeyPageState extends State<SetupEnterSecretKeyPage> {
|
|||
final issuer = _issuerController.text.trim();
|
||||
final secret = _secretController.text.trim().replaceAll(' ', '');
|
||||
final isStreamCode = issuer.toLowerCase() == "steam";
|
||||
late int digits;
|
||||
if (widget.code != null) {
|
||||
digits = widget.code!.digits;
|
||||
} else if (isStreamCode) {
|
||||
digits = Code.steamDigits;
|
||||
} else {
|
||||
digits = Code.defaultDigits;
|
||||
}
|
||||
if (widget.code != null && widget.code!.secret != secret) {
|
||||
ButtonResult? result = await showChoiceActionSheet(
|
||||
context,
|
||||
|
@ -185,7 +177,7 @@ class _SetupEnterSecretKeyPageState extends State<SetupEnterSecretKeyPage> {
|
|||
account,
|
||||
issuer,
|
||||
secret,
|
||||
digits,
|
||||
isStreamCode ? Code.steamDigits : Code.defaultDigits,
|
||||
)
|
||||
: widget.code!.copyWith(
|
||||
account: account,
|
||||
|
|
Loading…
Add table
Reference in a new issue