Prevent crash

pull/170/head
M66B 6 years ago
parent 5a9013e0c7
commit 74f2aa0e57

@ -3018,14 +3018,19 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
model.getIds(getContext(), getViewLifecycleOwner(), new Observer<List<Long>>() { model.getIds(getContext(), getViewLifecycleOwner(), new Observer<List<Long>>() {
@Override @Override
public void onChanged(List<Long> ids) { public void onChanged(List<Long> ids) {
selectionTracker.clearSelection(); new Handler().post(new Runnable() {
for (long id : ids) @Override
selectionTracker.select(id); public void run() {
selectionTracker.clearSelection();
ToastEx.makeText(getContext(), for (long id : ids)
getContext().getResources().getQuantityString( selectionTracker.select(id);
R.plurals.title_selected_conversations, ids.size(), ids.size()),
Toast.LENGTH_LONG).show(); ToastEx.makeText(getContext(),
getContext().getResources().getQuantityString(
R.plurals.title_selected_conversations, ids.size(), ids.size()),
Toast.LENGTH_LONG).show();
}
});
} }
}); });
} }

Loading…
Cancel
Save