From abf709f44c54fedf8ded3f3212ab09de8e2a61f7 Mon Sep 17 00:00:00 2001 From: M66B Date: Tue, 25 May 2021 15:37:02 +0200 Subject: [PATCH] Refactoring --- app/src/main/java/eu/faircode/email/FragmentOperations.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/FragmentOperations.java b/app/src/main/java/eu/faircode/email/FragmentOperations.java index 44878bad46..5660ac7bb5 100644 --- a/app/src/main/java/eu/faircode/email/FragmentOperations.java +++ b/app/src/main/java/eu/faircode/email/FragmentOperations.java @@ -88,7 +88,8 @@ public class FragmentOperations extends FragmentBase { super.onActivityCreated(savedInstanceState); // Observe folders - DB.getInstance(getContext()).operation().liveOperations().observe(getViewLifecycleOwner(), new Observer>() { + DB db = DB.getInstance(getContext()); + db.operation().liveOperations().observe(getViewLifecycleOwner(), new Observer>() { @Override public void onChanged(@Nullable List operations) { if (operations == null) @@ -104,7 +105,7 @@ public class FragmentOperations extends FragmentBase { } @Override - public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) { + public void onCreateOptionsMenu(@NonNull Menu menu, MenuInflater inflater) { inflater.inflate(R.menu.menu_operations, menu); super.onCreateOptionsMenu(menu, inflater); }