Skip to content

Commit

Permalink
⚡️ Reduce bookmarks fetching on start up
Browse files Browse the repository at this point in the history
  • Loading branch information
nwingt committed Jan 14, 2020
1 parent db28275 commit 6f075e8
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions app/screens/bookmark-screen/bookmark-screen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ import { Screen } from "../../components/screen"
@inject("readerStore")
@observer
export class BookmarkScreen extends React.Component<Props> {
list = React.createRef<ContentList>()

componentDidMount() {
this.list.current.props.onRefresh()
if (!this.props.readerStore.hasFetchedBookmarkList) {
this.props.readerStore.fetchBookmarkList()
}
}

private onBookmarkContentItem = (url: string) => {
Expand All @@ -34,7 +34,6 @@ export class BookmarkScreen extends React.Component<Props> {
>
<Header headerTx="BookmarkScreen.title" />
<ContentList
ref={this.list}
data={this.props.readerStore.bookmarkList}
creators={this.props.readerStore.creators}
hasFetched={this.props.readerStore.hasFetchedBookmarkList}
Expand Down

0 comments on commit 6f075e8

Please sign in to comment.