diff --git a/ElectronClient/app/app.js b/ElectronClient/app/app.js index f19cfac01..8252aecdb 100644 --- a/ElectronClient/app/app.js +++ b/ElectronClient/app/app.js @@ -345,6 +345,8 @@ class Application extends BaseApplication { // For those who leave the app always open setInterval(() => { runAutoUpdateCheck() }, 2 * 60 * 60 * 1000); } + + reg.scheduleSync(); } } diff --git a/ReactNativeClient/lib/MdToHtml.js b/ReactNativeClient/lib/MdToHtml.js index 0c5f74cad..512be73d3 100644 --- a/ReactNativeClient/lib/MdToHtml.js +++ b/ReactNativeClient/lib/MdToHtml.js @@ -238,6 +238,7 @@ class MdToHtml { render(body, style, options = null) { if (!options) options = {}; if (!options.postMessageSyntax) options.postMessageSyntax = 'postMessage'; + if (!options.paddingBottom) options.paddingBottom = '0'; const cacheKey = this.makeContentKey(this.loadedResources_, body, style, options); if (this.cachedContentKey_ === cacheKey) return this.cachedContent_; @@ -298,6 +299,7 @@ class MdToHtml { line-height: ` + style.htmlLineHeight + `; background-color: ` + style.htmlBackgroundColor + `; font-family: sans-serif; + padding-bottom: ` + options.paddingBottom + `; } p, h1, h2, h3, h4, ul, table { margin-top: 0; diff --git a/ReactNativeClient/lib/components/note-body-viewer.js b/ReactNativeClient/lib/components/note-body-viewer.js index 1710e78c7..d305fe6f1 100644 --- a/ReactNativeClient/lib/components/note-body-viewer.js +++ b/ReactNativeClient/lib/components/note-body-viewer.js @@ -48,6 +48,7 @@ class NoteBodyViewer extends Component { onResourceLoaded: () => { this.forceUpdate(); }, + paddingBottom: '3.8em', // Extra bottom padding to make it possible to scroll past the action button (so that it doesn't overlap the text) }; const html = this.mdToHtml_.render(note ? note.body : '', this.props.webViewStyle, mdOptions); @@ -79,7 +80,10 @@ class NoteBodyViewer extends Component { // So we use scalesPageToFix=false on iOS along with that CSS rule. // `baseUrl` is where the images will be loaded from. So images must use a path relative to resourceDir. - const source = { html: html, baseUrl: 'file://' + Setting.value('resourceDir') + '/' }; + const source = { + html: html, + baseUrl: 'file://' + Setting.value('resourceDir') + '/', + }; return ( diff --git a/ReactNativeClient/lib/models/note-tag.js b/ReactNativeClient/lib/models/note-tag.js index d04212a81..b7808e531 100644 --- a/ReactNativeClient/lib/models/note-tag.js +++ b/ReactNativeClient/lib/models/note-tag.js @@ -1,6 +1,5 @@ const { BaseItem } = require('lib/models/base-item.js'); const { BaseModel } = require('lib/base-model.js'); -const lodash = require('lodash'); class NoteTag extends BaseItem { diff --git a/ReactNativeClient/lib/models/resource.js b/ReactNativeClient/lib/models/resource.js index 627cb71e0..66465a90d 100644 --- a/ReactNativeClient/lib/models/resource.js +++ b/ReactNativeClient/lib/models/resource.js @@ -5,7 +5,6 @@ const { mime } = require('lib/mime-utils.js'); const { filename } = require('lib/path-utils.js'); const { FsDriverDummy } = require('lib/fs-driver-dummy.js'); const { markdownUtils } = require('lib/markdown-utils.js'); -const lodash = require('lodash'); class Resource extends BaseItem { diff --git a/ReactNativeClient/lib/models/tag.js b/ReactNativeClient/lib/models/tag.js index bc35683dc..8ff5f1d6b 100644 --- a/ReactNativeClient/lib/models/tag.js +++ b/ReactNativeClient/lib/models/tag.js @@ -3,7 +3,6 @@ const { BaseItem } = require('lib/models/base-item.js'); const { NoteTag } = require('lib/models/note-tag.js'); const { Note } = require('lib/models/note.js'); const { time } = require('lib/time-utils.js'); -const lodash = require('lodash'); class Tag extends BaseItem {