1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-12-05 22:57:29 +02:00

Various changes

This commit is contained in:
Laurent Cozic
2017-07-08 00:25:10 +01:00
parent 38c9d49cdb
commit a9f7b0d531
11 changed files with 44 additions and 21 deletions

View File

@@ -1,5 +1,5 @@
import React, { Component } from 'react';
import { ListView, View, Text } from 'react-native';
import { ListView, View, Text, Button } from 'react-native';
import { connect } from 'react-redux'
import { Log } from 'lib/log.js'
import { reg } from 'lib/registry.js'
@@ -23,6 +23,10 @@ class LogScreenComponent extends React.Component {
}
componentWillMount() {
this.resfreshLogEntries();
}
resfreshLogEntries() {
reg.logger().lastEntries(1000).then((entries) => {
const newDataSource = this.state.dataSource.cloneWithRows(entries);
this.setState({ dataSource: newDataSource });
@@ -47,6 +51,7 @@ class LogScreenComponent extends React.Component {
renderRow={renderRow}
enableEmptySections={true}
/>
<Button title="Refresh" onPress={() => { this.resfreshLogEntries(); }}/>
</View>
);
}