From 6f075e842691610df352e8760e1c686239d00fdf Mon Sep 17 00:00:00 2001 From: "Ng Wing Tat, David" Date: Tue, 14 Jan 2020 19:31:39 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9A=A1=EF=B8=8F=20Reduce=20bookmarks=20fetch?= =?UTF-8?q?ing=20on=20start=20up?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/screens/bookmark-screen/bookmark-screen.tsx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/app/screens/bookmark-screen/bookmark-screen.tsx b/app/screens/bookmark-screen/bookmark-screen.tsx index 47fa8eac3..343956fc4 100644 --- a/app/screens/bookmark-screen/bookmark-screen.tsx +++ b/app/screens/bookmark-screen/bookmark-screen.tsx @@ -11,10 +11,10 @@ import { Screen } from "../../components/screen" @inject("readerStore") @observer export class BookmarkScreen extends React.Component { - list = React.createRef() - componentDidMount() { - this.list.current.props.onRefresh() + if (!this.props.readerStore.hasFetchedBookmarkList) { + this.props.readerStore.fetchBookmarkList() + } } private onBookmarkContentItem = (url: string) => { @@ -34,7 +34,6 @@ export class BookmarkScreen extends React.Component { >