save on exit only with connected wallet (#186)

This commit is contained in:
m2049r 2018-01-18 17:23:35 +01:00 committed by GitHub
parent f0a3c05a9a
commit c9927edbd1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -8,8 +8,8 @@ android {
applicationId "com.m2049r.xmrwallet" applicationId "com.m2049r.xmrwallet"
minSdkVersion 21 minSdkVersion 21
targetSdkVersion 25 targetSdkVersion 25
versionCode 68 versionCode 70
versionName "1.3.8 'Satoshis Dream'" versionName "1.3.10 'Satoshis Dream'"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
externalNativeBuild { externalNativeBuild {
cmake { cmake {

View File

@ -141,7 +141,7 @@ public class WalletActivity extends SecureActivity implements WalletFragment.Lis
@Override @Override
protected void onDestroy() { protected void onDestroy() {
Timber.d("onDestroy()"); Timber.d("onDestroy()");
if (!isSynced()) { if ((mBoundService != null) && !isSynced() && (getWallet() != null)) {
saveWallet(); saveWallet();
} }
stopWalletService(); stopWalletService();