use apply rather than commit

This commit is contained in:
Mohamed Zenadi
2015-06-09 23:53:45 +02:00
parent 83281a1d91
commit 533d7babfc

View File

@@ -108,7 +108,7 @@ public class UserPreference extends AppCompatActivity {
//TODO Handle the diffent cases of exceptions
}
sharedPreferences.edit().putBoolean("repository_initialized", false).commit();
sharedPreferences.edit().putBoolean("repository_initialized", false).apply();
dialogInterface.cancel();
callingActivity.finish();
}