Fixes #2337 - Show captions of image in media details (conflicts fixed) (#2933)

* Api call

* added captions

* final commit

* some minor changes

* sigular

* test for captions

* mock fetchCaptionbyFileName

* corrected method name

* * used ? instead of !! (unsafe call on nullable)
* updated unit test for fetchCaptionByFilename()
This commit is contained in:
neslihanturan 2019-05-01 12:38:38 +03:00 committed by Ashish Kumar
parent 047059c490
commit 3c9b7ba7a8
9 changed files with 137 additions and 6 deletions

View file

@ -47,6 +47,7 @@ public class Media implements Parcelable {
protected String filename;
protected String description; // monolingual description on input...
protected String discussion;
protected String caption;
protected long dataLength;
protected Date dateCreated;
protected @Nullable Date dateUploaded;
@ -240,6 +241,22 @@ public class Media implements Parcelable {
return imageUrl;
}
/**
* Sets the Caption of the file.
* @param caption
*/
public void setCaption(String caption) {
this.caption = caption;
}
/**
* Gets the file Caption as a string.
* @return file Caption as a string
*/
public String getCaption() {
return caption;
}
/**
* Gets the name of the file.
* @return file name as a string