Force insert offline entry to avoid bad conflict
This commit is contained in:
parent
3c25216116
commit
4d34ab7a01
1 changed files with 4 additions and 1 deletions
|
@ -122,7 +122,10 @@ class CodeStore {
|
|||
oc.account == eachCode.account &&
|
||||
oc.secret == eachCode.secret,
|
||||
);
|
||||
int? generatedID = eachCode.generatedID!;
|
||||
if (!alreadyPresent) {
|
||||
// Avoid conflict with generatedID of online codes
|
||||
eachCode.generatedID = null;
|
||||
await CodeStore.instance.addCode(
|
||||
eachCode,
|
||||
accountMode: AccountMode.online,
|
||||
|
@ -130,7 +133,7 @@ class CodeStore {
|
|||
);
|
||||
}
|
||||
await OfflineAuthenticatorDB.instance.deleteByIDs(
|
||||
generatedIDs: [eachCode.generatedID!],
|
||||
generatedIDs: [generatedID],
|
||||
);
|
||||
}
|
||||
AuthenticatorService.instance.onlineSync().ignore();
|
||||
|
|
Loading…
Add table
Reference in a new issue