in src/views/knowledge-base/knowledge-base.tsx [127:154]
async componentDidMount() {
this.unsubscribeOnDimensionsChange = Dimensions.addEventListener('change', this.setSplitView);
this.unsubscribe = Router.setOnDispatchCallback((routeName: string, prevRouteName: string) => {
if (
!this.props.preventReload &&
routeName === routeMap.KnowledgeBase &&
(prevRouteName === routeMap.Article ||
prevRouteName === routeMap.ArticleCreate ||
prevRouteName === routeMap.Page)
) {
this.loadArticlesList(false);
}
});
this.props.clearUserLastVisitedArticle();
this.props.loadCachedArticleList();
if (!this.props.preventReload) {
await this.loadArticlesList();
}
if (this.props.project) {
this.scrollToProject(this.props.project);
}
this.goOnlineSubscription = addListenerGoOnline(() => {
this.loadArticlesList(false);
});
}