mirror of https://github.com/M66B/FairEmail.git
Small improvement
This commit is contained in:
parent
c3f5298fcd
commit
9ff3718561
|
@ -43,6 +43,17 @@ public class FragmentFolder extends FragmentEx {
|
|||
private ProgressBar pbSave;
|
||||
private ProgressBar pbWait;
|
||||
|
||||
private long id = -1;
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
// Get arguments
|
||||
Bundle args = getArguments();
|
||||
id = (args == null ? -1 : args.getLong("id"));
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
|
@ -50,10 +61,6 @@ public class FragmentFolder extends FragmentEx {
|
|||
|
||||
view = (ViewGroup) inflater.inflate(R.layout.fragment_folder, container, false);
|
||||
|
||||
// Get arguments
|
||||
Bundle args = getArguments();
|
||||
final long id = (args == null ? -1 : args.getLong("id"));
|
||||
|
||||
// Get controls
|
||||
cbSynchronize = view.findViewById(R.id.cbSynchronize);
|
||||
etAfter = view.findViewById(R.id.etAfter);
|
||||
|
@ -133,10 +140,6 @@ public class FragmentFolder extends FragmentEx {
|
|||
public void onActivityCreated(@Nullable final Bundle savedInstanceState) {
|
||||
super.onActivityCreated(savedInstanceState);
|
||||
|
||||
// Get arguments
|
||||
Bundle args = getArguments();
|
||||
long id = (args == null ? -1 : args.getLong("id"));
|
||||
|
||||
// Observe
|
||||
DB.getInstance(getContext()).folder().liveFolder(id).observe(getViewLifecycleOwner(), new Observer<EntityFolder>() {
|
||||
boolean once = false;
|
||||
|
|
Loading…
Reference in New Issue