mirror of
https://github.com/M66B/FairEmail.git
synced 2026-01-06 21:05:38 +01:00
Refactoring
This commit is contained in:
@@ -187,7 +187,7 @@ public class AdapterAccount extends RecyclerView.Adapter<AdapterAccount.ViewHold
|
||||
|
||||
PopupMenuLifecycle popupMenu = new PopupMenuLifecycle(context, powner, view);
|
||||
|
||||
popupMenu.getMenu().add(Menu.NONE, 1, 1, R.string.title_advanced_enabled)
|
||||
popupMenu.getMenu().add(Menu.NONE, 1, 1, R.string.title_synchronize_enabled)
|
||||
.setCheckable(true).setChecked(account.synchronize);
|
||||
|
||||
popupMenu.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() {
|
||||
|
||||
@@ -387,7 +387,7 @@ public class AdapterFolder extends RecyclerView.Adapter<AdapterFolder.ViewHolder
|
||||
popupMenu.getMenu().add(Menu.NONE, action_synchronize_now, 1, R.string.title_synchronize_now);
|
||||
|
||||
if (folder.account != null)
|
||||
popupMenu.getMenu().add(Menu.NONE, action_synchronize, 2, R.string.title_advanced_enabled)
|
||||
popupMenu.getMenu().add(Menu.NONE, action_synchronize, 2, R.string.title_synchronize_enabled)
|
||||
.setCheckable(true).setChecked(folder.synchronize);
|
||||
|
||||
if (folder.account != null) { // outbox
|
||||
|
||||
@@ -153,7 +153,7 @@ public class AdapterIdentity extends RecyclerView.Adapter<AdapterIdentity.ViewHo
|
||||
|
||||
PopupMenuLifecycle popupMenu = new PopupMenuLifecycle(context, powner, view);
|
||||
|
||||
popupMenu.getMenu().add(Menu.NONE, 1, 1, R.string.title_advanced_enabled)
|
||||
popupMenu.getMenu().add(Menu.NONE, 1, 1, R.string.title_synchronize_enabled)
|
||||
.setCheckable(true).setChecked(identity.synchronize);
|
||||
|
||||
popupMenu.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() {
|
||||
|
||||
@@ -74,7 +74,7 @@ public class FragmentOptions extends FragmentBase {
|
||||
public Fragment getItem(int position) {
|
||||
switch (position) {
|
||||
case 0:
|
||||
return new FragmentOptionsGeneral();
|
||||
return new FragmentOptionsSynchronize();
|
||||
case 1:
|
||||
return new FragmentOptionsConnection();
|
||||
case 2:
|
||||
@@ -99,7 +99,7 @@ public class FragmentOptions extends FragmentBase {
|
||||
public CharSequence getPageTitle(int position) {
|
||||
switch (position) {
|
||||
case 0:
|
||||
return getString(R.string.title_advanced_section_general);
|
||||
return getString(R.string.title_advanced_section_synchronize);
|
||||
case 1:
|
||||
return getString(R.string.title_advanced_section_connection);
|
||||
case 2:
|
||||
|
||||
@@ -48,7 +48,7 @@ import androidx.preference.PreferenceManager;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Calendar;
|
||||
|
||||
public class FragmentOptionsGeneral extends FragmentBase implements SharedPreferences.OnSharedPreferenceChangeListener {
|
||||
public class FragmentOptionsSynchronize extends FragmentBase implements SharedPreferences.OnSharedPreferenceChangeListener {
|
||||
private SwitchCompat swEnabled;
|
||||
private Spinner spPollInterval;
|
||||
private SwitchCompat swSchedule;
|
||||
@@ -65,7 +65,7 @@ public class FragmentOptionsGeneral extends FragmentBase implements SharedPrefer
|
||||
setSubtitle(R.string.title_advanced);
|
||||
setHasOptionsMenu(true);
|
||||
|
||||
View view = inflater.inflate(R.layout.fragment_options_general, container, false);
|
||||
View view = inflater.inflate(R.layout.fragment_options_synchronize, container, false);
|
||||
|
||||
// Get controls
|
||||
|
||||
Reference in New Issue
Block a user