Fixed #2198. And irrelevant changes int OsMoGroupActivity.

This commit is contained in:
GaidamakUA 2016-01-25 17:53:14 +02:00
parent aed14075d3
commit ebaf4e53c5
2 changed files with 5 additions and 5 deletions

View file

@ -80,7 +80,7 @@ public class PerformLiveUpdateAsyncTask
} else { } else {
settings.LIVE_UPDATES_RETRIES.resetToDefault(); settings.LIVE_UPDATES_RETRIES.resetToDefault();
List<IncrementalChangesManager.IncrementalUpdate> ll = result.getItemsForUpdate(); List<IncrementalChangesManager.IncrementalUpdate> ll = result.getItemsForUpdate();
if (!ll.isEmpty()) { if (ll != null && !ll.isEmpty()) {
ArrayList<IndexItem> itemsToDownload = new ArrayList<>(ll.size()); ArrayList<IndexItem> itemsToDownload = new ArrayList<>(ll.size());
for (IncrementalChangesManager.IncrementalUpdate iu : ll) { for (IncrementalChangesManager.IncrementalUpdate iu : ll) {
IndexItem indexItem = new IndexItem(iu.fileName, "Incremental update", IndexItem indexItem = new IndexItem(iu.fileName, "Incremental update",

View file

@ -617,9 +617,9 @@ public class OsMoGroupsActivity extends OsmandExpandableListActivity implements
if (!checkOperationIsNotRunning()) { if (!checkOperationIsNotRunning()) {
return; return;
} }
String operation = osMoPlugin.getGroups().leaveGroup((OsMoGroup) selectedObject); String operation = osMoPlugin.getGroups().leaveGroup(selectedObject);
startLongRunningOperation(operation); startLongRunningOperation(operation);
adapter.update((OsMoGroup) selectedObject); adapter.update(selectedObject);
adapter.notifyDataSetChanged(); adapter.notifyDataSetChanged();
} }
@ -1037,7 +1037,7 @@ public class OsMoGroupsActivity extends OsmandExpandableListActivity implements
} }
public void hideProgressBar() { public void hideProgressBar() {
OsMoGroupsActivity.this.operation = null; this.operation = null;
setSupportProgressBarIndeterminateVisibility(false); setSupportProgressBarIndeterminateVisibility(false);
} }
@ -1210,7 +1210,7 @@ public class OsMoGroupsActivity extends OsmandExpandableListActivity implements
} else { } else {
label.setTypeface(Typeface.DEFAULT, Typeface.ITALIC); label.setTypeface(Typeface.DEFAULT, Typeface.ITALIC);
} }
View v = (View) row.findViewById(R.id.settings); View v = row.findViewById(R.id.settings);
if(model.isMainGroup()) { if(model.isMainGroup()) {
v.setVisibility(View.GONE); v.setVisibility(View.GONE);
} else { } else {