mirror of
https://github.com/Bubka/2FAuth.git
synced 2025-03-30 18:26:14 +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
|
||||
*/
|
||||
fetchAccounts() {
|
||||
fetchAccounts(forceRefresh = false) {
|
||||
let accounts = []
|
||||
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 })
|
||||
}
|
||||
else if( this.accounts.length === 0 && accounts.length === 0 ) {
|
||||
@ -407,7 +407,7 @@
|
||||
|
||||
// we fetch the accounts again to prevent the js collection being
|
||||
// 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
|
||||
// desynchronize from the backend php collection
|
||||
this.fetchAccounts()
|
||||
this.fetchAccounts(true)
|
||||
this.fetchGroups()
|
||||
this.showGroupSelector = false
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user