MOBILE-3025 blocks: Fix comments block link

main
Pau Ferrer Ocaña 2019-08-09 15:00:09 +02:00
parent 0724235a06
commit 0e9d0356af
2 changed files with 2 additions and 2 deletions

View File

@ -47,7 +47,7 @@ export class AddonBlockCommentsHandler extends CoreBlockBaseHandler {
component: CoreBlockOnlyTitleComponent,
link: 'CoreCommentsViewerPage',
linkParams: { contextLevel: contextLevel, instanceId: instanceId,
component: 'block_comments', area: 'page_comments', itemId: 0 }
componentName: 'block_comments', area: 'page_comments', itemId: 0 }
};
}
}

View File

@ -156,7 +156,7 @@ export class CoreCommentsViewerPage implements OnDestroy {
this.canAddComments = this.addDeleteCommentsAvailable && response.canpost;
const comments = response.comments.sort((a, b) => b.timecreated - a.timecreated);
this.canLoadMore = comments.length >= CoreCommentsProvider.pageSize;
this.canLoadMore = comments.length > 0 && comments.length >= CoreCommentsProvider.pageSize;
return Promise.all(comments.map((comment) => {
// Get the user profile image.