mirror of https://github.com/M66B/FairEmail.git
Refactoring
This commit is contained in:
parent
e757446d5e
commit
fa432a76d7
|
@ -410,16 +410,11 @@ public class AdapterFolder extends RecyclerView.Adapter<AdapterFolder.ViewHolder
|
|||
public boolean onMenuItemClick(MenuItem item) {
|
||||
switch (item.getItemId()) {
|
||||
case R.string.title_synchronize_now:
|
||||
Bundle args = new Bundle();
|
||||
args.putLong("folder", folder.id);
|
||||
args.putBoolean("all", false);
|
||||
Intent data = new Intent();
|
||||
data.putExtra("args", args);
|
||||
parentFragment.onActivityResult(FragmentFolders.REQUEST_SYNC, RESULT_OK, data);
|
||||
onActionSync();
|
||||
return true;
|
||||
|
||||
case R.string.title_synchronize_all:
|
||||
onActionSynchronizeAll();
|
||||
onActionSynAll();
|
||||
return true;
|
||||
|
||||
case R.string.title_unified_folder:
|
||||
|
@ -477,7 +472,16 @@ public class AdapterFolder extends RecyclerView.Adapter<AdapterFolder.ViewHolder
|
|||
}
|
||||
}
|
||||
|
||||
private void onActionSynchronizeAll() {
|
||||
private void onActionSync() {
|
||||
Bundle args = new Bundle();
|
||||
args.putLong("folder", folder.id);
|
||||
args.putBoolean("all", false);
|
||||
Intent data = new Intent();
|
||||
data.putExtra("args", args);
|
||||
parentFragment.onActivityResult(FragmentFolders.REQUEST_SYNC, RESULT_OK, data);
|
||||
}
|
||||
|
||||
private void onActionSynAll() {
|
||||
Bundle aargs = new Bundle();
|
||||
aargs.putString("question",
|
||||
context.getString(R.string.title_ask_sync_all, folder.getDisplayName(context)));
|
||||
|
|
Loading…
Reference in New Issue