mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-23 10:02:51 +00:00
feat: lazy load all news
This commit is contained in:
@@ -29,8 +29,9 @@ export class NewsProvider {
|
||||
* Get news messages
|
||||
*
|
||||
* @param size How many messages/news to fetch
|
||||
* @param from From which (results) page to start
|
||||
*/
|
||||
async getList(size: number): Promise<SCMessage[]> {
|
||||
async getList(size: number, from: number): Promise<SCMessage[]> {
|
||||
const result = await this.dataProvider.search({
|
||||
filter: {
|
||||
type: 'value',
|
||||
@@ -47,6 +48,7 @@ export class NewsProvider {
|
||||
order: 'desc',
|
||||
}],
|
||||
size: size,
|
||||
from: from,
|
||||
});
|
||||
|
||||
return result.data as SCMessage[];
|
||||
|
||||
Reference in New Issue
Block a user