MOBILE-3833 glossary: Fix check empty entries list
parent
c6bdde182c
commit
56d0cf251d
|
@ -65,7 +65,7 @@
|
|||
</ng-container>
|
||||
</ion-list>
|
||||
|
||||
<core-empty-box *ngIf="(!entries || entries.empty) && (!isSearch || hasSearched)" icon="fas-list"
|
||||
<core-empty-box *ngIf="(!entries || !entries.hasEntries) && (!isSearch || hasSearched)" icon="fas-list"
|
||||
[message]="'addon.mod_glossary.noentriesfound' | translate">
|
||||
</core-empty-box>
|
||||
|
||||
|
|
|
@ -472,4 +472,13 @@ class AddonModGlossaryEntriesManager extends CoreListItemsManager<AddonModGlossa
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check whether there is any entry in the items.
|
||||
*
|
||||
* @return Whether there is an entry.
|
||||
*/
|
||||
get hasEntries(): boolean {
|
||||
return this.getSource().onlineEntries.length > 0 || this.getSource().offlineEntries.length > 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue