Use proper lifecycle for SimpleTask which touches fragment view.

This commit is contained in:
Alex Hart 2020-09-10 09:50:46 -03:00
parent 13a67980d9
commit f680749a00

View File

@ -260,7 +260,7 @@ public class ConversationListFragment extends MainFragment implements ActionMode
InsightsLauncher.showInsightsModal(requireContext(), requireFragmentManager()); InsightsLauncher.showInsightsModal(requireContext(), requireFragmentManager());
} }
SimpleTask.run(getLifecycle(), Recipient::self, this::initializeProfileIcon); SimpleTask.run(getViewLifecycleOwner().getLifecycle(), Recipient::self, this::initializeProfileIcon);
if (!searchToolbar.isVisible() && list.getAdapter() != defaultAdapter) { if (!searchToolbar.isVisible() && list.getAdapter() != defaultAdapter) {
list.removeItemDecoration(searchAdapterDecoration); list.removeItemDecoration(searchAdapterDecoration);