Fix check for images types
This commit is contained in:
parent
2b93241ae1
commit
bf34a0296f
1 changed files with 6 additions and 1 deletions
|
@ -502,7 +502,12 @@ public class TrackActivityFragmentAdapter implements TrackBitmapDrawerListener {
|
||||||
private String getMetadataImageLink(@NonNull GPXUtilities.Metadata metadata) {
|
private String getMetadataImageLink(@NonNull GPXUtilities.Metadata metadata) {
|
||||||
String link = metadata.link;
|
String link = metadata.link;
|
||||||
if (!TextUtils.isEmpty(link)) {
|
if (!TextUtils.isEmpty(link)) {
|
||||||
if (link.contains(".jpg") || link.contains(".gif") || link.contains(".jpeg") || link.contains(".png") || link.contains(".bmp") || link.contains(".webp")) {
|
String lowerCaseLink = link.toLowerCase();
|
||||||
|
if (lowerCaseLink.contains(".jpg")
|
||||||
|
|| lowerCaseLink.contains(".jpeg")
|
||||||
|
|| lowerCaseLink.contains(".png")
|
||||||
|
|| lowerCaseLink.contains(".bmp")
|
||||||
|
|| lowerCaseLink.contains(".webp")) {
|
||||||
return link;
|
return link;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue