fix: allow cloud and local accounts to be reused instead of creating new ones
There are three behavioural changes implemented in this MR: 1. For local accounts Because of the outage, clicking on the USE LOCAL NOTES button was creating multiple local accounts inside the Notes database. LocalAccountViewModel now checks if there's any existing local account, and if there's any, it reuses the account instead of creating a new one. If there's no local account found in the database, only then a new local account is created and used for saving the notes. 2. For cloud accounts Similar to the local account check, ImportAccountActivity checks for any existing online accounts with the same user ID. If it finds any, it reuses the account. Otherwise, a new online account is created in the database. 3. Clean-up of accounts in database migration During the outage, users may have clicked on the two buttons — CHOOSE ACCOUNT or USE LOCAL NOTES — numerous times to get it past. Hence, there will be multiple accounts created which will have no notes associated with them. Only the accounts created before the outage will have notes associated with. This database migration will delete the accounts (possibly created during the outage) without any notes.
Loading
Please register or sign in to comment