From a9f7b0d5310ba4bad6b37fd21fab476acb5adc6b Mon Sep 17 00:00:00 2001 From: Laurent Cozic Date: Sat, 8 Jul 2017 00:25:10 +0100 Subject: [PATCH] Various changes --- .../android/app/src/main/AndroidManifest.xml | 6 +++--- ReactNativeClient/clean_build.bat | 4 ++++ .../{debug-log.bat => debug_log.bat} | 0 ReactNativeClient/lib/components/item-list.js | 20 ++++++++++++------- .../lib/components/screen-header.js | 1 + .../lib/components/screens/folders.js | 2 +- .../lib/components/screens/log.js | 7 ++++++- .../lib/components/screens/notes.js | 2 +- .../lib/components/screens/onedrive-login.js | 7 ++++++- ReactNativeClient/root.js | 14 ++++++------- ReactNativeClient/start_server.bat | 2 ++ 11 files changed, 44 insertions(+), 21 deletions(-) create mode 100644 ReactNativeClient/clean_build.bat rename ReactNativeClient/{debug-log.bat => debug_log.bat} (100%) create mode 100644 ReactNativeClient/start_server.bat diff --git a/ReactNativeClient/android/app/src/main/AndroidManifest.xml b/ReactNativeClient/android/app/src/main/AndroidManifest.xml index 728a660ab..2b893b418 100644 --- a/ReactNativeClient/android/app/src/main/AndroidManifest.xml +++ b/ReactNativeClient/android/app/src/main/AndroidManifest.xml @@ -5,9 +5,9 @@ android:versionName="0.8.0"> - - - + + + - ); + + if (this.state.dataSource.getRowCount()) { + return ( + + ); + } else { + const noItemMessage = this.props.noItemMessage ? this.props.noItemMessage : ''; + return {noItemMessage}; + } } } diff --git a/ReactNativeClient/lib/components/screen-header.js b/ReactNativeClient/lib/components/screen-header.js index 7a2b2d6f0..141c94060 100644 --- a/ReactNativeClient/lib/components/screen-header.js +++ b/ReactNativeClient/lib/components/screen-header.js @@ -24,6 +24,7 @@ class ScreenHeaderComponent extends Component { // Note: this is hardcoded for now because navigation.state doesn't tell whether // it's possible to go back or not. Maybe it's possible to get this information // from somewhere else. + return true; return this.props.navState.routeName != 'Notes'; } diff --git a/ReactNativeClient/lib/components/screens/folders.js b/ReactNativeClient/lib/components/screens/folders.js index 340b76a93..e2ab75fae 100644 --- a/ReactNativeClient/lib/components/screens/folders.js +++ b/ReactNativeClient/lib/components/screens/folders.js @@ -17,7 +17,7 @@ class FoldersScreenComponent extends React.Component { return ( - + ); diff --git a/ReactNativeClient/lib/components/screens/log.js b/ReactNativeClient/lib/components/screens/log.js index 1ee302010..49b705387 100644 --- a/ReactNativeClient/lib/components/screens/log.js +++ b/ReactNativeClient/lib/components/screens/log.js @@ -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} /> +