Refactoring

This commit is contained in:
M66B
2019-05-06 15:03:35 +02:00
parent fba2d11365
commit 2b848fe26c
7 changed files with 25 additions and 10 deletions

View File

@@ -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() {

View File

@@ -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

View File

@@ -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() {

View File

@@ -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:

View File

@@ -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