mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 04:43:54 +01:00
commit
6ad24a3af6
6 changed files with 7 additions and 7 deletions
|
|
@ -230,7 +230,7 @@ public class Media implements Parcelable {
|
||||||
}
|
}
|
||||||
|
|
||||||
public Media(Parcel in) {
|
public Media(Parcel in) {
|
||||||
localUri = (Uri)in.readParcelable(Uri.class.getClassLoader());
|
localUri = in.readParcelable(Uri.class.getClassLoader());
|
||||||
imageUrl = in.readString();
|
imageUrl = in.readString();
|
||||||
filename = in.readString();
|
filename = in.readString();
|
||||||
description = in.readString();
|
description = in.readString();
|
||||||
|
|
|
||||||
|
|
@ -85,7 +85,7 @@ public class Contribution extends Media {
|
||||||
|
|
||||||
public Contribution(Parcel in) {
|
public Contribution(Parcel in) {
|
||||||
super(in);
|
super(in);
|
||||||
contentUri = (Uri)in.readParcelable(Uri.class.getClassLoader());
|
contentUri = in.readParcelable(Uri.class.getClassLoader());
|
||||||
source = in.readString();
|
source = in.readString();
|
||||||
timestamp = (Date) in.readSerializable();
|
timestamp = (Date) in.readSerializable();
|
||||||
state = in.readInt();
|
state = in.readInt();
|
||||||
|
|
|
||||||
|
|
@ -98,7 +98,7 @@ public class ContributionController {
|
||||||
|
|
||||||
public void loadState(Bundle savedInstanceState) {
|
public void loadState(Bundle savedInstanceState) {
|
||||||
if(savedInstanceState != null) {
|
if(savedInstanceState != null) {
|
||||||
lastGeneratedCaptureURI = (Uri) savedInstanceState.getParcelable("lastGeneratedCaptureURI");
|
lastGeneratedCaptureURI = savedInstanceState.getParcelable("lastGeneratedCaptureURI");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,7 @@ class ContributionsListAdapter extends CursorAdapter {
|
||||||
|
|
||||||
if(views.url == null || !views.url.equals(actualUrl)) {
|
if(views.url == null || !views.url.equals(actualUrl)) {
|
||||||
if(actualUrl.startsWith("http")) {
|
if(actualUrl.startsWith("http")) {
|
||||||
MediaWikiImageView mwImageView = (MediaWikiImageView)views.imageView;
|
MediaWikiImageView mwImageView = views.imageView;
|
||||||
mwImageView.setMedia(contribution, ((CommonsApplication) activity.getApplicationContext()).getImageLoader());
|
mwImageView.setMedia(contribution, ((CommonsApplication) activity.getApplicationContext()).getImageLoader());
|
||||||
// FIXME: For transparent images
|
// FIXME: For transparent images
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -65,7 +65,7 @@ class ContributionsListAdapter extends CursorAdapter {
|
||||||
@Override
|
@Override
|
||||||
public void onLoadingFailed(String imageUri, View view, FailReason failReason) {
|
public void onLoadingFailed(String imageUri, View view, FailReason failReason) {
|
||||||
super.onLoadingFailed(imageUri, view, failReason);
|
super.onLoadingFailed(imageUri, view, failReason);
|
||||||
MediaWikiImageView mwImageView = (MediaWikiImageView)views.imageView;
|
MediaWikiImageView mwImageView = views.imageView;
|
||||||
mwImageView.setMedia(contribution, ((CommonsApplication) activity.getApplicationContext()).getImageLoader());
|
mwImageView.setMedia(contribution, ((CommonsApplication) activity.getApplicationContext()).getImageLoader());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -199,7 +199,7 @@ public class NearbyListFragment extends ListFragment implements TaskListener {
|
||||||
@Override
|
@Override
|
||||||
public View getView(int position, View convertView, ViewGroup parent) {
|
public View getView(int position, View convertView, ViewGroup parent) {
|
||||||
// Get the data item for this position
|
// Get the data item for this position
|
||||||
Place place = (Place) getItem(position);
|
Place place = getItem(position);
|
||||||
Log.d(TAG, "Place " + place.name);
|
Log.d(TAG, "Place " + place.name);
|
||||||
|
|
||||||
// Check if an existing view is being reused, otherwise inflate the view
|
// Check if an existing view is being reused, otherwise inflate the view
|
||||||
|
|
|
||||||
|
|
@ -229,7 +229,7 @@ public class ShareActivity
|
||||||
Intent intent = getIntent();
|
Intent intent = getIntent();
|
||||||
|
|
||||||
if(intent.getAction().equals(Intent.ACTION_SEND)) {
|
if(intent.getAction().equals(Intent.ACTION_SEND)) {
|
||||||
mediaUri = (Uri) intent.getParcelableExtra(Intent.EXTRA_STREAM);
|
mediaUri = intent.getParcelableExtra(Intent.EXTRA_STREAM);
|
||||||
if(intent.hasExtra(UploadService.EXTRA_SOURCE)) {
|
if(intent.hasExtra(UploadService.EXTRA_SOURCE)) {
|
||||||
source = intent.getStringExtra(UploadService.EXTRA_SOURCE);
|
source = intent.getStringExtra(UploadService.EXTRA_SOURCE);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue