Skip to content
This repository has been archived by the owner on Jun 15, 2022. It is now read-only.

Commit

Permalink
SFJS 0.3.10, fix android export decrypted, dont set modified date for…
Browse files Browse the repository at this point in the history
… locking note, v2.3.3
  • Loading branch information
moughxyz committed Aug 5, 2018
1 parent ef040a1 commit d66e5a2
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 10 deletions.
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ android {
applicationId "com.standardnotes"
minSdkVersion 21
targetSdkVersion 25
versionCode 2030200
versionName "2.3.2"
versionCode 2030300
versionName "2.3.3"
multiDexEnabled true
ndk {
abiFilters "armeabi-v7a", "x86"
Expand Down
2 changes: 1 addition & 1 deletion ios/StandardNotes/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>2.3.2</string>
<string>2.3.3</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "StandardNotes",
"version": "2.3.2",
"versionIOS": "2.3.2",
"versionAndroid": "2.3.2",
"version": "2.3.3",
"versionIOS": "2.3.3",
"versionAndroid": "2.3.3",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
Expand All @@ -22,7 +22,7 @@
"react-native-vector-icons": "^4.3.0",
"regenerator": "^0.13.2",
"sn-models": "0.1.1",
"standard-file-js": "0.3.8"
"standard-file-js": "0.3.10"
},
"devDependencies": {
"babel-cli": "^6.26.0",
Expand Down
2 changes: 1 addition & 1 deletion src/lib/itemActionManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export default class ItemActionManager {

else if(event == this.LockEvent || event == this.UnlockEvent) {
item.setAppDataItem("locked", event == this.LockEvent);
item.setDirty(true);
item.setDirty(true, true);
Sync.get().sync();
callback && callback();
}
Expand Down
12 changes: 11 additions & 1 deletion src/screens/Account.js
Original file line number Diff line number Diff line change
Expand Up @@ -296,9 +296,11 @@ export default class Account extends Abstract {
}

var jsonString = JSON.stringify(data, null, 2 /* pretty print */);
var stringData = App.isIOS ? jsonString : base64.encode(jsonString)
var stringData = App.isIOS ? jsonString : base64.encode(unescape(encodeURIComponent(jsonString)))
var fileType = App.isAndroid ? ".json" : "json"; // Android creates a tmp file and expects dot with extension

var calledCallback = false;

Mailer.mail({
subject: 'Standard Notes Backup',
recipients: [''],
Expand All @@ -307,10 +309,18 @@ export default class Account extends Abstract {
attachment: { data: stringData, type: fileType, name: encrypted ? "SN-Encrypted-Backup" : 'SN-Decrypted-Backup' }
}, (error, event) => {
callback();
calledCallback = true;
if(error) {
Alert.alert('Error', 'Unable to send email.');
}
});

// On Android the Mailer callback event isn't always triggered.
setTimeout(function () {
if(!calledCallback) {
callback();
}
}, 2500);
}

onThemeSelect = (theme) => {
Expand Down

0 comments on commit d66e5a2

Please sign in to comment.