Merge remote-tracking branch 'origin/master'

This commit is contained in:
Weblate 2015-02-13 18:05:54 +01:00
commit 2e6b445369
2 changed files with 15 additions and 7 deletions

View file

@ -182,6 +182,13 @@ public class FavoritesListFragment extends ListFragment implements SearchActivit
TextView label = (TextView) row.findViewById(R.id.favourite_label);
ImageView icon = (ImageView) row.findViewById(R.id.favourite_icon);
final FavouritePoint model = getItem(position);
if (!model.getCategory().isEmpty()){
row.findViewById(R.id.group_image).setVisibility(View.VISIBLE);
} else {
row.findViewById(R.id.group_image).setVisibility(View.GONE);
}
((TextView) row.findViewById(R.id.group_name)).setText(model.getCategory());
icon.setImageDrawable(FavoriteImageDrawable.getOrCreate(activity, model.getColor()));
String distance = "";
if (location != null) {

View file

@ -250,7 +250,6 @@ public class DownloadIndexAdapter extends OsmandBaseExpandableListAdapter implem
});
if (indexFileNames != null) {
if (e.isAlreadyDownloaded(indexFileNames)) {
if (e.getType() == DownloadActivityType.HILLSHADE_FILE
|| e.getType() == DownloadActivityType.SRTM_COUNTRY_FILE) {
@ -267,17 +266,19 @@ public class DownloadIndexAdapter extends OsmandBaseExpandableListAdapter implem
String sfName = e.getTargetFileName();
final boolean updatableResource = indexActivatedFileNames.containsKey(sfName);
if (updatableResource && !DownloadActivity.downloadListIndexThread.checkIfItemOutdated(e)) {
edition.setText(downloadFragment.getResources().getString(R.string.local_index_installed) + " : "
+ indexActivatedFileNames.get(sfName));
description.setText(indexActivatedFileNames.get(sfName) + " " + e.getSizeDescription(clctx));
} else if (indexFileNames.containsKey(sfName) && !DownloadActivity.downloadListIndexThread.checkIfItemOutdated(e)) {
edition.setText(downloadFragment.getResources().getString(R.string.local_index_installed) + " : "
+ indexFileNames.get(sfName));
description.setText(indexFileNames.get(sfName) + " " + e.getSizeDescription(clctx));
} else if (updatableResource) {
String updatedDescr = indexActivatedFileNames.get(sfName) + " " + e.getSizeDescription(clctx);
description.setText(updatedDescr);
edition.setText(downloadFragment.getResources().getString(R.string.local_index_installed) + " : "
+ indexActivatedFileNames.get(sfName));
+ e.getDate(format));
} else {
edition.setText(name.getText() + "\n" + downloadFragment.getResources().getString(R.string.local_index_installed) + " : "
description.setText(name.getText() + "\n" + downloadFragment.getResources().getString(R.string.local_index_installed) + " : "
+ indexFileNames.get(sfName));
edition.setText(downloadFragment.getResources().getString(R.string.local_index_installed) + " : "
+ e.getDate(format));
}
}
}