diff --git a/OsmAnd/src/net/osmand/plus/audionotes/NotesFragment.java b/OsmAnd/src/net/osmand/plus/audionotes/NotesFragment.java index d4f2eeb42f..5e8c5f76db 100644 --- a/OsmAnd/src/net/osmand/plus/audionotes/NotesFragment.java +++ b/OsmAnd/src/net/osmand/plus/audionotes/NotesFragment.java @@ -325,13 +325,17 @@ public class NotesFragment extends OsmAndListFragment { return new SortFragmentListener() { @Override public void onSortModeChanged() { - listAdapter.clear(); - listAdapter.addAll(createItemsList()); - listAdapter.notifyDataSetChanged(); + recreateAdapterData(); } }; } + private void recreateAdapterData() { + listAdapter.clear(); + listAdapter.addAll(createItemsList()); + listAdapter.notifyDataSetChanged(); + } + private void enterSelectionMode(final int type) { actionMode = getActionBarActivity().startSupportActionMode(new ActionMode.Callback() { @@ -418,9 +422,8 @@ public class NotesFragment extends OsmAndListFragment { Recording rec = it.next(); plugin.deleteRecording(rec, true); it.remove(); - listAdapter.remove(rec); } - listAdapter.notifyDataSetChanged(); + recreateAdapterData(); } }) .setNegativeButton(R.string.shared_string_cancel, null)