forked from platypush/platypush
[Entities UI] Don't disable/set loading=true on properties during initial refresh.
This commit is contained in:
parent
5bec01a389
commit
57737b1b72
1 changed files with 25 additions and 24 deletions
|
@ -235,7 +235,7 @@ export default {
|
|||
delete this.selector.selectedGroups[group.name]
|
||||
},
|
||||
|
||||
async refresh(group) {
|
||||
async refresh(group, setLoading=true) {
|
||||
const entities = (group ? group.entities : this.entities) || {}
|
||||
const args = {}
|
||||
if (group)
|
||||
|
@ -244,6 +244,7 @@ export default {
|
|||
return obj
|
||||
}, {})
|
||||
|
||||
if (setLoading)
|
||||
this.loadingEntities = Object.values(entities).reduce((obj, entity) => {
|
||||
if (this._shouldSkipLoading(entity))
|
||||
return obj
|
||||
|
@ -428,7 +429,7 @@ export default {
|
|||
|
||||
const hasCachedEntities = this.loadCachedEntities()
|
||||
await this.sync(!hasCachedEntities)
|
||||
await this.refresh()
|
||||
await this.refresh(null, !hasCachedEntities)
|
||||
setInterval(() => this.refreshEntitiesCache(), 10000)
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in a new issue