mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-05 00:23:09 +02:00
Confirm restore default values
This commit is contained in:
@@ -38,7 +38,6 @@ import android.widget.ImageButton;
|
||||
import android.widget.Spinner;
|
||||
import android.widget.TextView;
|
||||
import android.widget.TimePicker;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
@@ -368,21 +367,12 @@ public class FragmentOptionsSynchronize extends FragmentBase implements SharedPr
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
if (item.getItemId() == R.id.menu_default) {
|
||||
onMenuDefault();
|
||||
FragmentOptions.reset(getContext(), RESET_OPTIONS);
|
||||
return true;
|
||||
}
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
|
||||
private void onMenuDefault() {
|
||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getContext());
|
||||
SharedPreferences.Editor editor = prefs.edit();
|
||||
for (String option : RESET_OPTIONS)
|
||||
editor.remove(option);
|
||||
editor.apply();
|
||||
ToastEx.makeText(getContext(), R.string.title_setup_done, Toast.LENGTH_LONG).show();
|
||||
}
|
||||
|
||||
private void setOptions() {
|
||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getContext());
|
||||
boolean pro = ActivityBilling.isPro(getContext());
|
||||
|
||||
Reference in New Issue
Block a user