Skip to content

Commit 6dd79bd

Browse files
committed
* correct first run dialog
1 parent 98d250b commit 6dd79bd

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

app/src/main/java/com/todobom/opennotescanner/OpenNoteScannerActivity.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1072,17 +1072,17 @@ private void statsOptInDialog() {
10721072
statsOptInDialog.setPositiveButton(R.string.answer_yes, new DialogInterface.OnClickListener() {
10731073
@Override
10741074
public void onClick(DialogInterface dialog, int which) {
1075-
mSharedPref.edit().putBoolean("usage_stats",true);
1076-
mSharedPref.edit().putBoolean("isFirstRun",false);
1075+
mSharedPref.edit().putBoolean("usage_stats",true).commit();
1076+
mSharedPref.edit().putBoolean("isFirstRun",false).commit();
10771077
dialog.dismiss();
10781078
}
10791079
});
10801080

10811081
statsOptInDialog.setNegativeButton(R.string.answer_no, new DialogInterface.OnClickListener() {
10821082
@Override
10831083
public void onClick(DialogInterface dialog, int which) {
1084-
mSharedPref.edit().putBoolean("usage_stats",false);
1085-
mSharedPref.edit().putBoolean("isFirstRun",false);
1084+
mSharedPref.edit().putBoolean("usage_stats",false).commit();
1085+
mSharedPref.edit().putBoolean("isFirstRun",false).commit();
10861086
dialog.dismiss();
10871087
}
10881088
});

app/src/main/java/com/todobom/opennotescanner/OpenNoteScannerApplication.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ private void initPiwik() {
5151

5252
// enable usage stats on google play
5353
if (BuildConfig.FLAVOR.equals("gplay") && mSharedPref.getBoolean("isFirstRun",true)) {
54-
mSharedPref.edit().putBoolean("usage_stats", true);
55-
mSharedPref.edit().putBoolean("isFirstRun", false);
54+
mSharedPref.edit().putBoolean("usage_stats", true).commit();
55+
mSharedPref.edit().putBoolean("isFirstRun", false).commit();
5656
}
5757

5858
// usage stats is optional and only when not debugging

0 commit comments

Comments
 (0)