1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-06-12 22:57:38 +02:00

All: Handle case where resource blob is missing during sync

This commit is contained in:
Laurent Cozic
2018-01-21 17:01:37 +00:00
parent e355f4e49b
commit 86eee376bb
9 changed files with 47 additions and 19 deletions

View File

@ -3,6 +3,7 @@ const { GeolocationReact } = require('lib/geolocation-react.js');
const { PoorManIntervals } = require('lib/poor-man-intervals.js');
const RNFetchBlob = require('react-native-fetch-blob').default;
const { generateSecureRandom } = require('react-native-securerandom');
const FsDriverRN = require('lib/fs-driver-rn.js').FsDriverRN;
function shimInit() {
shim.Geolocation = GeolocationReact;
@ -10,6 +11,11 @@ function shimInit() {
shim.clearInterval = PoorManIntervals.clearInterval;
shim.sjclModule = require('lib/vendor/sjcl-rn.js');
shim.fsDriver = () => {
if (!shim.fsDriver_) shim.fsDriver_ = new FsDriverRN();
return shim.fsDriver_;
}
shim.randomBytes = async (count) => {
const randomBytes = await generateSecureRandom(count);
let temp = [];