mirror of https://github.com/M66B/FairEmail.git
Use dialog fragments for compose actions
This commit is contained in:
parent
72db63e979
commit
b855358169
|
@ -135,7 +135,8 @@ abstract class ActivityBase extends AppCompatActivity implements SharedPreferenc
|
||||||
@Override
|
@Override
|
||||||
protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
|
protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
|
||||||
Log.i("Result class=" + this.getClass().getSimpleName() +
|
Log.i("Result class=" + this.getClass().getSimpleName() +
|
||||||
" request=" + requestCode + " result=" + resultCode + " data=" + data);
|
" request=" + requestCode + " result=" + resultCode);
|
||||||
|
Log.logExtras(data);
|
||||||
super.onActivityResult(requestCode, resultCode, data);
|
super.onActivityResult(requestCode, resultCode, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -603,13 +603,17 @@ public class AdapterFolder extends RecyclerView.Adapter<AdapterFolder.ViewHolder
|
||||||
}
|
}
|
||||||
|
|
||||||
AdapterFolder(Fragment parentFragment, long account, boolean show_hidden, IFolderSelectedListener listener) {
|
AdapterFolder(Fragment parentFragment, long account, boolean show_hidden, IFolderSelectedListener listener) {
|
||||||
|
this(parentFragment.getContext(), parentFragment.getViewLifecycleOwner(), account, show_hidden, listener);
|
||||||
this.parentFragment = parentFragment;
|
this.parentFragment = parentFragment;
|
||||||
|
}
|
||||||
|
|
||||||
|
AdapterFolder(Context context, LifecycleOwner owner, long account, boolean show_hidden, IFolderSelectedListener listener) {
|
||||||
this.account = account;
|
this.account = account;
|
||||||
this.show_hidden = show_hidden;
|
this.show_hidden = show_hidden;
|
||||||
this.listener = listener;
|
this.listener = listener;
|
||||||
|
|
||||||
this.context = parentFragment.getContext();
|
this.context = context;
|
||||||
this.owner = parentFragment.getViewLifecycleOwner();
|
this.owner = owner;
|
||||||
this.inflater = LayoutInflater.from(context);
|
this.inflater = LayoutInflater.from(context);
|
||||||
|
|
||||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
|
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
|
||||||
|
|
|
@ -119,7 +119,8 @@ public class FragmentBase extends Fragment {
|
||||||
@Override
|
@Override
|
||||||
public void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
|
public void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
|
||||||
Log.i("Result class=" + this.getClass().getSimpleName() +
|
Log.i("Result class=" + this.getClass().getSimpleName() +
|
||||||
" request=" + requestCode + " result=" + resultCode + " data=" + data);
|
" request=" + requestCode + " result=" + resultCode);
|
||||||
|
Log.logExtras(data);
|
||||||
super.onActivityResult(requestCode, resultCode, data);
|
super.onActivityResult(requestCode, resultCode, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -77,7 +77,7 @@ public class FragmentDialogFolder extends DialogFragment {
|
||||||
|
|
||||||
long account = args.getLong("account");
|
long account = args.getLong("account");
|
||||||
AdapterFolder adapter = new AdapterFolder(
|
AdapterFolder adapter = new AdapterFolder(
|
||||||
FragmentDialogFolder.this,
|
getContext(), getActivity(),
|
||||||
account, false, new AdapterFolder.IFolderSelectedListener() {
|
account, false, new AdapterFolder.IFolderSelectedListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onFolderSelected(TupleFolderEx folder) {
|
public void onFolderSelected(TupleFolderEx folder) {
|
||||||
|
|
Loading…
Reference in New Issue