diff options
Diffstat (limited to 'app/src/main/java/it/niedermann/nextcloud/deck/ui/filter')
-rw-r--r-- | app/src/main/java/it/niedermann/nextcloud/deck/ui/filter/FilterDueTypeFragment.java | 10 | ||||
-rw-r--r-- | app/src/main/java/it/niedermann/nextcloud/deck/ui/filter/FilterUserFragment.java | 10 |
2 files changed, 16 insertions, 4 deletions
diff --git a/app/src/main/java/it/niedermann/nextcloud/deck/ui/filter/FilterDueTypeFragment.java b/app/src/main/java/it/niedermann/nextcloud/deck/ui/filter/FilterDueTypeFragment.java index 5134498b2..ac23faf6c 100644 --- a/app/src/main/java/it/niedermann/nextcloud/deck/ui/filter/FilterDueTypeFragment.java +++ b/app/src/main/java/it/niedermann/nextcloud/deck/ui/filter/FilterDueTypeFragment.java @@ -18,12 +18,12 @@ import it.niedermann.nextcloud.deck.model.enums.EDueType; public class FilterDueTypeFragment extends Fragment implements SelectionListener<EDueType> { private FilterViewModel filterViewModel; + private DialogFilterDuedateBinding binding; @Nullable @Override public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { - - final var binding = DialogFilterDuedateBinding.inflate(requireActivity().getLayoutInflater()); + binding = DialogFilterDuedateBinding.inflate(requireActivity().getLayoutInflater()); filterViewModel = new ViewModelProvider(requireActivity()).get(FilterViewModel.class); @@ -34,6 +34,12 @@ public class FilterDueTypeFragment extends Fragment implements SelectionListener } @Override + public void onDestroy() { + super.onDestroy(); + this.binding = null; + } + + @Override public void onItemSelected(EDueType item) { filterViewModel.setFilterInformationDraftDueType(item); } diff --git a/app/src/main/java/it/niedermann/nextcloud/deck/ui/filter/FilterUserFragment.java b/app/src/main/java/it/niedermann/nextcloud/deck/ui/filter/FilterUserFragment.java index 708e2e541..59768de39 100644 --- a/app/src/main/java/it/niedermann/nextcloud/deck/ui/filter/FilterUserFragment.java +++ b/app/src/main/java/it/niedermann/nextcloud/deck/ui/filter/FilterUserFragment.java @@ -22,12 +22,12 @@ import it.niedermann.nextcloud.deck.ui.MainViewModel; public class FilterUserFragment extends Fragment implements SelectionListener<User> { private FilterViewModel filterViewModel; + private DialogFilterAssigneesBinding binding; @Nullable @Override public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { - - final var binding = DialogFilterAssigneesBinding.inflate(requireActivity().getLayoutInflater()); + binding = DialogFilterAssigneesBinding.inflate(requireActivity().getLayoutInflater()); final var mainViewModel = new ViewModelProvider(requireActivity()).get(MainViewModel.class); filterViewModel = new ViewModelProvider(requireActivity()).get(FilterViewModel.class); @@ -47,6 +47,12 @@ public class FilterUserFragment extends Fragment implements SelectionListener<Us } @Override + public void onDestroy() { + super.onDestroy(); + this.binding = null; + } + + @Override public void onItemSelected(@Nullable User item) { if (item == null) { filterViewModel.setNotAssignedUser(true); |