mirror of
https://github.com/irislib/iris-messenger.git
synced 2024-10-18 14:13:21 +00:00
load bigger page on show more
This commit is contained in:
parent
2fcd224863
commit
51c187da3c
@ -176,7 +176,7 @@ function init() {
|
||||
State.local.get('settings').get('maxConnectedPeers').on(n => {
|
||||
if (n !== undefined) maxConnectedPeers = n;
|
||||
});
|
||||
setInterval(checkGunPeerCount, 2000);
|
||||
setInterval(checkGunPeerCount, 1000);
|
||||
}
|
||||
|
||||
export default {
|
||||
|
@ -6,12 +6,12 @@ import State from '../State';
|
||||
import _ from 'lodash';
|
||||
import {translate as t} from '../Translation';
|
||||
|
||||
const PAGE_SIZE = 20;
|
||||
const INITIAL_PAGE_SIZE = 20;
|
||||
|
||||
class MessageFeed extends Component {
|
||||
constructor() {
|
||||
super();
|
||||
this.state = {sortedMessages:[], displayCount: PAGE_SIZE};
|
||||
this.state = {sortedMessages:[], displayCount: INITIAL_PAGE_SIZE};
|
||||
this.mappedMessages = new Map();
|
||||
}
|
||||
|
||||
@ -73,7 +73,7 @@ class MessageFeed extends Component {
|
||||
`)}
|
||||
${displayCount < this.state.sortedMessages.length ? html`
|
||||
<p>
|
||||
<button onClick=${() => this.setState({displayCount: displayCount + PAGE_SIZE})}>
|
||||
<button onClick=${() => this.setState({displayCount: displayCount + INITIAL_PAGE_SIZE * 3})}>
|
||||
${t('show_more')}
|
||||
</button>
|
||||
</p>
|
||||
|
Loading…
Reference in New Issue
Block a user