[fix] avoid dosync
This commit is contained in:
@@ -97,7 +97,6 @@ export class AccountStorage{
|
||||
export async function unMigrationAccount() {
|
||||
const keys = await forageStorage.keys()
|
||||
let db = get(DataBase)
|
||||
db.account = null
|
||||
let i = 0;
|
||||
const MigrationStorage = localforage.createInstance({name: "risuai"})
|
||||
|
||||
@@ -110,6 +109,7 @@ export async function unMigrationAccount() {
|
||||
i += 1
|
||||
}
|
||||
|
||||
db.account = null
|
||||
await MigrationStorage.setItem('database/database.bin', encodeRisuSave(db))
|
||||
|
||||
alertStore.set({
|
||||
@@ -117,7 +117,7 @@ export async function unMigrationAccount() {
|
||||
msg: ""
|
||||
})
|
||||
|
||||
localStorage.removeItem('dosync')
|
||||
localStorage.setItem('dosync', 'avoid')
|
||||
localStorage.removeItem('accountst')
|
||||
localStorage.removeItem('fallbackRisuToken')
|
||||
location.reload()
|
||||
|
||||
@@ -42,9 +42,10 @@ export class AutoStorage{
|
||||
if(this.isAccount){
|
||||
return true
|
||||
}
|
||||
if(localStorage.getItem('dosync') === 'avoid'){
|
||||
return false
|
||||
}
|
||||
if((localStorage.getItem('dosync') === 'sync' || db.account?.useSync) && (localStorage.getItem('accountst') !== 'able')){
|
||||
console.log(localStorage.getItem('dosync'))
|
||||
console.log(db.account)
|
||||
const keys = await this.realStorage.keys()
|
||||
let i = 0;
|
||||
const accountStorage = new AccountStorage()
|
||||
|
||||
Reference in New Issue
Block a user