mirror of
https://github.com/Bubka/2FAuth.git
synced 2025-04-09 17:31:58 +02:00
Fix #14 : Cache is not refreshed automatically after group changes
This commit is contained in:
parent
3048dfc087
commit
a6694f7723
@ -334,7 +334,7 @@
|
|||||||
/**
|
/**
|
||||||
* Fetch accounts from db
|
* Fetch accounts from db
|
||||||
*/
|
*/
|
||||||
fetchAccounts() {
|
fetchAccounts(forceRefresh = false) {
|
||||||
let accounts = []
|
let accounts = []
|
||||||
this.selectedAccounts = []
|
this.selectedAccounts = []
|
||||||
|
|
||||||
@ -350,7 +350,7 @@
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
if ( this.accounts.length > 0 && !objectEquals(accounts, this.accounts) ) {
|
if ( this.accounts.length > 0 && !objectEquals(accounts, this.accounts) && !forceRefresh ) {
|
||||||
this.$notify({ type: 'is-dark', text: '<span class="is-size-7">' + this.$t('commons.some_data_have_changed') + '</span><br /><a href="." class="button is-rounded is-warning is-small">' + this.$t('commons.reload') + '</a>', duration:-1, closeOnClick: false })
|
this.$notify({ type: 'is-dark', text: '<span class="is-size-7">' + this.$t('commons.some_data_have_changed') + '</span><br /><a href="." class="button is-rounded is-warning is-small">' + this.$t('commons.reload') + '</a>', duration:-1, closeOnClick: false })
|
||||||
}
|
}
|
||||||
else if( this.accounts.length === 0 && accounts.length === 0 ) {
|
else if( this.accounts.length === 0 && accounts.length === 0 ) {
|
||||||
@ -407,7 +407,7 @@
|
|||||||
|
|
||||||
// we fetch the accounts again to prevent the js collection being
|
// we fetch the accounts again to prevent the js collection being
|
||||||
// desynchronize from the backend php collection
|
// desynchronize from the backend php collection
|
||||||
this.fetchAccounts()
|
this.fetchAccounts(true)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -424,7 +424,7 @@
|
|||||||
|
|
||||||
// we fetch the accounts again to prevent the js collection being
|
// we fetch the accounts again to prevent the js collection being
|
||||||
// desynchronize from the backend php collection
|
// desynchronize from the backend php collection
|
||||||
this.fetchAccounts()
|
this.fetchAccounts(true)
|
||||||
this.fetchGroups()
|
this.fetchGroups()
|
||||||
this.showGroupSelector = false
|
this.showGroupSelector = false
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user