Fix some small issues

This commit is contained in:
topjohnwu
2017-01-25 16:45:55 +08:00
parent bcc695234c
commit 6eb814ef0b
5 changed files with 37 additions and 18 deletions

View File

@@ -91,13 +91,7 @@ public class SettingsActivity extends AppCompatActivity {
Preference clear = findPreference("clear");
clear.setOnPreferenceClickListener((pref) -> {
SharedPreferences repoMap = getActivity().getSharedPreferences(ModuleHelper.FILE_KEY, Context.MODE_PRIVATE);
repoMap.edit()
.putString(ModuleHelper.ETAG_KEY, "")
.putInt(ModuleHelper.VERSION_KEY, 0)
.apply();
new Async.LoadRepos(getActivity()).exec();
Toast.makeText(getActivity(), R.string.repo_cache_cleared, Toast.LENGTH_LONG).show();
ModuleHelper.clearRepoCache(getActivity());
return true;
});