mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-01 15:09:14 +00:00
Use one variable instead of two
This commit is contained in:
@@ -71,7 +71,7 @@ class LibContentView extends React.Component {
|
||||
errorMsg: '',
|
||||
isDirentDetailShow: false,
|
||||
updateDetail: false,
|
||||
itemShownLimit: false,
|
||||
itemsShowLength: 100,
|
||||
};
|
||||
|
||||
window.onpopstate = this.onpopstate;
|
||||
@@ -413,11 +413,13 @@ class LibContentView extends React.Component {
|
||||
}
|
||||
|
||||
onPageScroll = () => {
|
||||
this.setState({itemShownLimit: false})
|
||||
let itemsShowLength = this.state.itemsShowLength;
|
||||
itemsShowLength += 100;
|
||||
this.setState({itemsShowLength: itemsShowLength});
|
||||
}
|
||||
|
||||
onSwitchPage = () => {
|
||||
this.setState({itemShownLimit: true})
|
||||
this.setState({itemsShowLength: 100});
|
||||
}
|
||||
|
||||
getThumbnails = (repoID, path, direntList) => {
|
||||
@@ -1461,8 +1463,8 @@ class LibContentView extends React.Component {
|
||||
onDeleteRepoTag={this.onDeleteRepoTag}
|
||||
onToolbarFileTagChanged={this.onToolbarFileTagChanged}
|
||||
updateDetail={this.state.updateDetail}
|
||||
itemShownLimit={this.state.itemShownLimit}
|
||||
onPageScroll={this.onPageScroll}
|
||||
itemsShowLength={this.state.itemsShowLength}
|
||||
/>
|
||||
{this.state.pathExist && !this.state.isViewFile && (
|
||||
<FileUploader
|
||||
|
Reference in New Issue
Block a user