File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed
commons/src/main/java/org/wikimedia/commons Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -95,6 +95,10 @@ public String getCreator() {
9595 return creator ;
9696 }
9797
98+ public void setCreator (String creator ) {
99+ this .creator = creator ;
100+ }
101+
98102 public String getThumbnailUrl (int width ) {
99103 return Utils .makeThumbUrl (imageUrl , filename , width );
100104 }
@@ -149,4 +153,8 @@ public Media(Parcel in) {
149153 creator = in .readString ();
150154 tags = (HashMap <String , Object >)in .readSerializable ();
151155 }
156+
157+ public void setDescription (String description ) {
158+ this .description = description ;
159+ }
152160}
Original file line number Diff line number Diff line change 55import android .net .*;
66import android .os .*;
77import android .provider .*;
8+ import android .text .TextUtils ;
89import android .webkit .MimeTypeMap ;
910
1011import java .io .*;
@@ -60,6 +61,14 @@ protected Contribution doInBackground(Void... voids) {
6061 throw new RuntimeException (e );
6162 }
6263
64+ if (TextUtils .isEmpty (contribution .getCreator ())) {
65+ contribution .setCreator (app .getCurrentAccount ().name );
66+ }
67+
68+ if (contribution .getDescription () == null ) {
69+ contribution .setDescription ("" );
70+ }
71+
6372 String mimeType = (String )contribution .getTag ("mimeType" );
6473 String extension = MimeTypeMap .getSingleton ().getExtensionFromMimeType (mimeType );
6574
You can’t perform that action at this time.
0 commit comments