1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-11-29 22:48:10 +02:00

Mobile: Fixes #299: App freezes when connecting to OneDrive login page while internet connection is down

This commit is contained in:
Laurent Cozic
2018-03-14 23:17:02 +00:00
parent 26331f61e1
commit 9e0bf1acb2
20 changed files with 5 additions and 65 deletions

View File

@@ -1,7 +1,6 @@
const React = require('react'); const Component = React.Component;
const { View, Button, TextInput, StyleSheet } = require('react-native');
const { connect } = require('react-redux');
const { Log } = require('lib/log.js');
const { ActionButton } = require('lib/components/action-button.js');
const Folder = require('lib/models/Folder.js');
const BaseModel = require('lib/BaseModel.js');

View File

@@ -1,7 +1,6 @@
const React = require('react'); const Component = React.Component;
const { ListView, View, Text, Button, StyleSheet, Platform } = require('react-native');
const { connect } = require('react-redux');
const { Log } = require('lib/log.js');
const { reg } = require('lib/registry.js');
const { ScreenHeader } = require('lib/components/screen-header.js');
const { time } = require('lib/time-utils');

View File

@@ -2,7 +2,6 @@ const React = require('react'); const Component = React.Component;
const { Platform, Keyboard, BackHandler, View, Button, TextInput, WebView, Text, StyleSheet, Linking, Image } = require('react-native');
const { connect } = require('react-redux');
const { uuid } = require('lib/uuid.js');
const { Log } = require('lib/log.js');
const RNFS = require('react-native-fs');
const Note = require('lib/models/Note.js');
const Setting = require('lib/models/Setting.js');

View File

@@ -3,7 +3,6 @@ const { View, Button, Text } = require('react-native');
const { stateUtils } = require('lib/reducer.js');
const { connect } = require('react-redux');
const { reg } = require('lib/registry.js');
const { Log } = require('lib/log.js');
const { NoteList } = require('lib/components/note-list.js');
const Folder = require('lib/models/Folder.js');
const Tag = require('lib/models/Tag.js');

View File

@@ -2,7 +2,6 @@ const React = require('react'); const Component = React.Component;
const { View } = require('react-native');
const { WebView, Button, Text } = require('react-native');
const { connect } = require('react-redux');
const { Log } = require('lib/log.js');
const Setting = require('lib/models/Setting.js');
const { ScreenHeader } = require('lib/components/screen-header.js');
const { reg } = require('lib/registry.js');
@@ -44,8 +43,6 @@ class OneDriveLoginScreenComponent extends BaseScreenComponent {
const parsedUrl = parseUri(url);
if (!this.authCode_ && parsedUrl && parsedUrl.queryKey && parsedUrl.queryKey.code) {
Log.info('URL: ', url, parsedUrl.queryKey);
this.authCode_ = parsedUrl.queryKey.code
try {
@@ -60,8 +57,8 @@ class OneDriveLoginScreenComponent extends BaseScreenComponent {
}
}
async webview_error(error) {
Log.error(error);
async webview_error() {
alert('Could not load page. Please check your connection and try again.');
}
retryButton_click() {
@@ -93,7 +90,7 @@ class OneDriveLoginScreenComponent extends BaseScreenComponent {
<WebView
source={source}
onNavigationStateChange={(o) => { this.webview_load(o); }}
onError={(error) => { this.webview_error(error); }}
onError={() => { this.webview_error(); }}
/>
<Button title={_("Refresh")} onPress={() => { this.retryButton_click(); }}></Button>
</View>

View File

@@ -2,7 +2,6 @@ const React = require('react'); const Component = React.Component;
const { ListView, StyleSheet, View, Text, Button, FlatList } = require('react-native');
const Setting = require('lib/models/Setting.js');
const { connect } = require('react-redux');
const { Log } = require('lib/log.js');
const { reg } = require('lib/registry.js');
const { ScreenHeader } = require('lib/components/screen-header.js');
const { time } = require('lib/time-utils');

View File

@@ -1,7 +1,6 @@
const React = require('react'); const Component = React.Component;
const { View, Text, StyleSheet } = require('react-native');
const { connect } = require('react-redux');
const { Log } = require('lib/log.js');
const { ScreenHeader } = require('lib/components/screen-header.js');
const { ActionButton } = require('lib/components/action-button.js');
const { BaseScreenComponent } = require('lib/components/base-screen.js');