Merge branch 'master' of ssh://github.com/osmandapp/Osmand

This commit is contained in:
PavelRatushny 2017-11-24 13:54:05 +02:00
commit c5c88f7979
2 changed files with 3 additions and 13 deletions

View file

@ -1581,12 +1581,6 @@ public class AudioVideoNotesPlugin extends OsmandPlugin {
private void updateRecordControl(final MapActivity mapActivity, final File f) {
recordControl.setText(app.getString(R.string.shared_string_control_stop), "");
recordControl.setIcons(R.drawable.widget_icon_av_active, R.drawable.widget_icon_av_active);
final MapInfoLayer mil = mapActivity.getMapLayers().getMapInfoLayer();
if (!recordControl.isVisible()) {
recordControl.setExplicitlyVisible(true);
mil.recreateControls();
mapActivity.getMapView().refreshMap(true);
}
recordControl.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
@ -1599,10 +1593,6 @@ public class AudioVideoNotesPlugin extends OsmandPlugin {
if (!recordingDone) {
if (!restart || !stopMediaRecording(true)) {
recordingDone = true;
if (!recordControl.isVisible()) {
recordControl.setExplicitlyVisible(false);
mapActivity.getMapLayers().getMapInfoLayer().recreateControls();
}
stopMediaRecording(false);
if (recordControl != null) {
setRecordListener(recordControl, mapActivity);

View file

@ -196,7 +196,7 @@ public class NotesFragment extends OsmAndListFragment {
NotesSortByMode sortByMode = getMyApplication().getSettings().NOTES_SORT_BY_MODE.get();
if (sortByMode.isByDate()) {
res.add(NotesAdapter.TYPE_DATE_HEADER);
res.addAll(sortItemsByDateDescending(recs));
res.addAll(sortRecsByDateDescending(recs));
} else if (sortByMode.isByType()) {
List<Recording> audios = new LinkedList<>();
List<Recording> photos = new LinkedList<>();
@ -221,7 +221,7 @@ public class NotesFragment extends OsmAndListFragment {
private void addToResIfNotEmpty(List<Object> res, List<Recording> recs, int header) {
if (!recs.isEmpty()) {
res.add(header);
res.addAll(recs);
res.addAll(sortRecsByDateDescending(recs));
}
}
@ -317,7 +317,7 @@ public class NotesFragment extends OsmAndListFragment {
listAdapter.notifyDataSetChanged();
}
private List<Recording> sortItemsByDateDescending(List<Recording> recs) {
private List<Recording> sortRecsByDateDescending(List<Recording> recs) {
Collections.sort(recs, new Comparator<Recording>() {
@Override
public int compare(Recording first, Recording second) {