Skip to content

Commit d4c210d

Browse files
committed
Revert "Revert "Merge pull request #1799 from wordpress-mobile/feature/1795-reader-render-attachments""
This reverts commit 6936da1. Conflicts: WordPress/src/main/java/org/wordpress/android/datasets/ReaderDatabase.java
1 parent 0960d4d commit d4c210d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

WordPressUtils/src/main/java/org/wordpress/android/util/PhotonUtils.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public static String fixAvatar(final String imageUrl, int avatarSz) {
2424
return getPhotonImageUrl(imageUrl, avatarSz, avatarSz);
2525

2626
// remove all other params, then add query string for size and "mystery man" default
27-
return UrlUtils.removeQuery(imageUrl) + String.format("?s=%d&d=mm", avatarSz);
27+
return UrlUtils.removeQuery(imageUrl) + "?s=" + avatarSz + "&d=mm";
2828
}
2929

3030
/*
@@ -64,18 +64,18 @@ public static String getPhotonImageUrl(String imageUrl, int width, int height) {
6464
// see http://wp.tutsplus.com/tutorials/how-to-generate-website-screenshots-for-your-wordpress-site/
6565
// ex: http://s.wordpress.com/mshots/v1/http%3A%2F%2Fnickbradbury.com?w=600
6666
if (isMshotsUrl(imageUrl)) {
67-
return imageUrl + String.format("?w=%d&h=%d", width, height);
67+
return imageUrl + "?w=" + width + "&h=" + height;
6868
}
6969

7070
// if both width & height are passed use the "resize" param, use only "w" or "h" if just
7171
// one of them is set, otherwise no query string
7272
final String query;
7373
if (width > 0 && height > 0) {
74-
query = String.format("?resize=%d,%d", width, height);
74+
query = "?resize=" + width + "," + height;
7575
} else if (width > 0) {
76-
query = String.format("?w=%d", width);
76+
query = "?w=" + width;
7777
} else if (height > 0) {
78-
query = String.format("?h=%d", height);
78+
query = "?h=" + height;
7979
} else {
8080
query = "";
8181
}

0 commit comments

Comments
 (0)