You've already forked joplin
							
							
				mirror of
				https://github.com/laurent22/joplin.git
				synced 2025-10-31 00:07:48 +02:00 
			
		
		
		
	Various changes
This commit is contained in:
		| @@ -5,9 +5,9 @@ | ||||
|     android:versionName="0.8.0"> | ||||
|  | ||||
|     <uses-permission android:name="android.permission.INTERNET" /> | ||||
|     <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />  | ||||
|     <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/> | ||||
|     <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> | ||||
|     <!-- <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />  --> | ||||
|     <!-- <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/> --> | ||||
|     <!-- <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> --> | ||||
|     <uses-permission android:name="android.permission.READ_PHONE_STATE" tools:node="remove"/> | ||||
|  | ||||
|     <uses-sdk | ||||
|   | ||||
							
								
								
									
										4
									
								
								ReactNativeClient/clean_build.bat
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								ReactNativeClient/clean_build.bat
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,4 @@ | ||||
| @echo off | ||||
| rmdir /s/q android\app\build | ||||
| rmdir /s/q android\build | ||||
| rmdir /s/q android\.gradle | ||||
| @@ -59,13 +59,19 @@ class ItemListComponent extends Component { | ||||
| 		} | ||||
|  | ||||
| 		// `enableEmptySections` is to fix this warning: https://github.com/FaridSafi/react-native-gifted-listview/issues/39 | ||||
| 		return ( | ||||
| 			<ListView | ||||
| 				dataSource={this.state.dataSource} | ||||
| 				renderRow={renderRow} | ||||
| 				enableEmptySections={true} | ||||
| 			/> | ||||
| 		); | ||||
|  | ||||
| 		if (this.state.dataSource.getRowCount()) { | ||||
| 			return ( | ||||
| 				<ListView | ||||
| 					dataSource={this.state.dataSource} | ||||
| 					renderRow={renderRow} | ||||
| 					enableEmptySections={true} | ||||
| 				/> | ||||
| 			); | ||||
| 		} else { | ||||
| 			const noItemMessage = this.props.noItemMessage ? this.props.noItemMessage : ''; | ||||
| 			return <Text>{noItemMessage}</Text>; | ||||
| 		} | ||||
| 	} | ||||
| } | ||||
|  | ||||
|   | ||||
| @@ -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'; | ||||
| 	} | ||||
|  | ||||
|   | ||||
| @@ -17,7 +17,7 @@ class FoldersScreenComponent extends React.Component { | ||||
| 		return ( | ||||
| 			<View style={{flex: 1}}> | ||||
| 				<ScreenHeader navState={this.props.navigation.state} /> | ||||
| 				<FolderList style={{flex: 1}}/> | ||||
| 				<FolderList noItemMessage={_('There is currently no notebook. Create one by clicking on the (+) button.')} style={{flex: 1}}/> | ||||
| 				<ActionButton></ActionButton> | ||||
| 			</View> | ||||
| 		); | ||||
|   | ||||
| @@ -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> | ||||
| 		); | ||||
| 	} | ||||
|   | ||||
| @@ -49,7 +49,7 @@ class NotesScreenComponent extends React.Component { | ||||
| 		return ( | ||||
| 			<View style={{flex: 1}}> | ||||
| 				<ScreenHeader title={title} navState={this.props.navigation.state} menuOptions={this.menuOptions()} /> | ||||
| 				<NoteList style={{flex: 1}}/> | ||||
| 				<NoteList noItemMessage={_('There are currently no notes. Create one by clicking on the (+) button.')} style={{flex: 1}}/> | ||||
| 				<ActionButton parentFolderId={this.props.selectedFolderId}></ActionButton> | ||||
| 			</View> | ||||
| 		); | ||||
|   | ||||
| @@ -46,7 +46,12 @@ class OneDriveLoginScreenComponent extends React.Component { | ||||
| 			let code = url.split('?code='); | ||||
| 			this.authCode_ = code[1]; | ||||
|  | ||||
| 			await reg.oneDriveApi().execTokenRequest(this.authCode_, this.redirectUrl(), true); | ||||
| 			try { | ||||
| 				await reg.oneDriveApi().execTokenRequest(this.authCode_, this.redirectUrl(), true); | ||||
| 				this.props.dispatch({ type: 'Navigation/BACK' }); | ||||
| 			} catch (error) { | ||||
| 				alert(error.message); | ||||
| 			} | ||||
|  | ||||
| 			this.authCode_ = null; | ||||
| 		} | ||||
|   | ||||
| @@ -259,14 +259,14 @@ class AppComponent extends React.Component { | ||||
| 			if (Setting.value('env') == 'prod') { | ||||
| 				await db.open({ name: 'joplin.sqlite' }) | ||||
| 			} else { | ||||
| 				await db.open({ name: 'joplin-51.sqlite' }) | ||||
| 				await db.open({ name: 'joplin-52.sqlite' }) | ||||
|  | ||||
| 				// await db.exec('DELETE FROM notes'); | ||||
| 				// await db.exec('DELETE FROM folders'); | ||||
| 				// await db.exec('DELETE FROM tags'); | ||||
| 				// await db.exec('DELETE FROM note_tags'); | ||||
| 				// await db.exec('DELETE FROM resources'); | ||||
| 				// await db.exec('DELETE FROM deleted_items'); | ||||
| 				await db.exec('DELETE FROM notes'); | ||||
| 				await db.exec('DELETE FROM folders'); | ||||
| 				await db.exec('DELETE FROM tags'); | ||||
| 				await db.exec('DELETE FROM note_tags'); | ||||
| 				await db.exec('DELETE FROM resources'); | ||||
| 				await db.exec('DELETE FROM deleted_items'); | ||||
| 			} | ||||
|  | ||||
| 			reg.logger().info('Database is ready.'); | ||||
|   | ||||
							
								
								
									
										2
									
								
								ReactNativeClient/start_server.bat
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								ReactNativeClient/start_server.bat
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,2 @@ | ||||
| @echo off | ||||
| npm start -- --reset-cache | ||||
		Reference in New Issue
	
	Block a user