1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-24 10:27:10 +02:00

VArious fixes

This commit is contained in:
Laurent Cozic 2017-07-15 17:14:15 +01:00
parent aabc58224a
commit 0e05567706
4 changed files with 10 additions and 10 deletions

View File

@ -344,7 +344,11 @@ function enexXmlToMdArray(stream, resources) {
let x = node.attributes && node.attributes.checked && node.attributes.checked.toLowerCase() == 'true' ? 'X' : ' ';
section.lines.push('- [' + x + '] ');
} else if (n == "hr") {
section.lines.push('------------------------------------------------------------------------------');
// Needs to be surrounded by new lines so that it's properly rendered as a line when converting to HTML
section.lines.push(NEWLINE);
section.lines.push('----------------------------------------');
section.lines.push(NEWLINE);
section.lines.push(NEWLINE);
} else if (n == "h1") {
section.lines.push(BLOCK_OPEN); section.lines.push("# ");
} else if (n == "h2") {

View File

@ -2,6 +2,7 @@ import { connect } from 'react-redux'
import { Button, Text } from 'react-native';
import { Log } from 'lib/log.js';
import { Note } from 'lib/models/note.js';
import { FoldersScreenUtils } from 'lib/components/screens/folders-utils.js'
import { NotesScreenUtils } from 'lib/components/screens/notes-utils.js'
import { reg } from 'lib/registry.js';
import { _ } from 'lib/locale.js';
@ -64,11 +65,7 @@ class SideMenuContentComponent extends Component {
try {
sync.start(options).then(async () => {
let initialFolders = await Folder.all({ includeConflictFolder: true });
dispatch({
type: 'FOLDERS_UPDATE_ALL',
folders: initialFolders,
});
await FoldersScreenUtils.refreshFolders();
});
} catch (error) {
Log.error(error);

View File

@ -252,7 +252,7 @@ class OneDriveApi {
if (!response.ok) {
this.setAuth(null);
let msg = await response.text();
throw new Error(msg);
throw new Error(msg + ': TOKEN: ' + this.auth_);
}
let auth = await response.json();

View File

@ -248,9 +248,8 @@ async function initialize(dispatch, backButtonHandler) {
const mainLogger = new Logger();
mainLogger.addTarget('database', { database: logDatabase, source: 'm' });
mainLogger.addTarget('console');
if (Setting.value('env') == 'env') mainLogger.addTarget('console');
mainLogger.setLevel(Logger.LEVEL_DEBUG);
mainLogger.addTarget('database', { database: logDatabase, source: 'm' });
reg.setLogger(mainLogger);
@ -259,7 +258,7 @@ async function initialize(dispatch, backButtonHandler) {
const dbLogger = new Logger();
dbLogger.addTarget('database', { database: logDatabase, source: 'm' });
dbLogger.addTarget('console');
if (Setting.value('env') == 'env') dbLogger.addTarget('console');
dbLogger.setLevel(Logger.LEVEL_INFO);
let db = new JoplinDatabase(new DatabaseDriverReactNative());