Remove last download time on local import of hosts file

Fixes #275
This commit is contained in:
M66B 2016-02-04 07:11:53 +01:00
parent edf9e11993
commit 338bf5ccec
1 changed files with 5 additions and 0 deletions

View File

@ -781,6 +781,11 @@ public class ActivitySettings extends AppCompatActivity implements SharedPrefere
protected void onPostExecute(Throwable ex) {
if (ex == null) {
Toast.makeText(ActivitySettings.this, R.string.msg_completed, Toast.LENGTH_LONG).show();
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(ActivitySettings.this);
prefs.edit().remove("hosts_last").apply();
getPreferenceScreen().findPreference("hosts_download").setSummary(null);
SinkholeService.reload(null, "hosts", ActivitySettings.this);
getPreferenceScreen().findPreference("use_hosts").setEnabled(true);
} else