Remove header after deleting all group

This commit is contained in:
Alexander Sytnyk 2017-11-17 17:57:17 +02:00
parent 2b9275bcd9
commit 96502930d2

View file

@ -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)