mirror of https://github.com/M66B/FairEmail.git
Refactoring
This commit is contained in:
parent
f584868e9d
commit
a6e7054343
|
@ -313,8 +313,8 @@ public class AdapterContact extends RecyclerView.Adapter<AdapterContact.ViewHold
|
|||
|
||||
FragmentDialogEditName fragment = new FragmentDialogEditName();
|
||||
fragment.setArguments(args);
|
||||
fragment.setTargetFragment(parentFragment, FragmentContacts.REQUEST_NAME);
|
||||
fragment.show(parentFragment.getParentFragmentManager(), "contact:edit");
|
||||
fragment.setTargetFragment(parentFragment, FragmentContacts.REQUEST_EDIT_NAME);
|
||||
fragment.show(parentFragment.getParentFragmentManager(), "contact:name");
|
||||
}
|
||||
|
||||
private void onActionDelete() {
|
||||
|
|
|
@ -37,9 +37,6 @@ import android.view.MenuInflater;
|
|||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.CheckBox;
|
||||
import android.widget.ImageButton;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
@ -47,7 +44,6 @@ import androidx.annotation.Nullable;
|
|||
import androidx.appcompat.app.AlertDialog;
|
||||
import androidx.appcompat.widget.SearchView;
|
||||
import androidx.constraintlayout.widget.Group;
|
||||
import androidx.documentfile.provider.DocumentFile;
|
||||
import androidx.lifecycle.Observer;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
@ -65,7 +61,6 @@ import java.util.List;
|
|||
import javax.mail.Address;
|
||||
import javax.mail.internet.InternetAddress;
|
||||
|
||||
import ezvcard.Ezvcard;
|
||||
import ezvcard.VCard;
|
||||
import ezvcard.VCardVersion;
|
||||
import ezvcard.io.text.VCardReader;
|
||||
|
@ -86,7 +81,7 @@ public class FragmentContacts extends FragmentBase {
|
|||
private static final int REQUEST_ACCOUNT = 1;
|
||||
private static final int REQUEST_IMPORT = 2;
|
||||
private static final int REQUEST_EXPORT = 3;
|
||||
static final int REQUEST_NAME = 4;
|
||||
static final int REQUEST_EDIT_NAME = 4;
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
|
@ -260,7 +255,7 @@ public class FragmentContacts extends FragmentBase {
|
|||
if (resultCode == RESULT_OK && data != null)
|
||||
handleExport(data);
|
||||
break;
|
||||
case REQUEST_NAME:
|
||||
case REQUEST_EDIT_NAME:
|
||||
if (resultCode == RESULT_OK && data != null)
|
||||
onEditName(data.getBundleExtra("args"));
|
||||
break;
|
||||
|
@ -454,7 +449,7 @@ public class FragmentContacts extends FragmentBase {
|
|||
protected void onException(Bundle args, Throwable ex) {
|
||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||
}
|
||||
}.execute(this, args, "edit:name");
|
||||
}.execute(this, args, "contact:name");
|
||||
}
|
||||
|
||||
public static class FragmentDelete extends FragmentDialogBase {
|
||||
|
|
Loading…
Reference in New Issue