From cb63da786a6ae10034132dd190e928b1ef543a3b Mon Sep 17 00:00:00 2001 From: Dan Roundhill Date: Wed, 3 Sep 2014 15:51:27 -0700 Subject: [PATCH] Revert "Merge pull request #1799 from wordpress-mobile/feature/1795-reader-render-attachments" This reverts commit 0c5bd2d2a9102f6232dd8be2c7d188478adf096a, reversing changes made to 083a2727309e034a824f88c47b6ad1e7b83145ab. --- .../java/org/wordpress/android/util/PhotonUtils.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/WordPressUtils/src/main/java/org/wordpress/android/util/PhotonUtils.java b/WordPressUtils/src/main/java/org/wordpress/android/util/PhotonUtils.java index bf275e56abdc..497d756ee377 100644 --- a/WordPressUtils/src/main/java/org/wordpress/android/util/PhotonUtils.java +++ b/WordPressUtils/src/main/java/org/wordpress/android/util/PhotonUtils.java @@ -24,7 +24,7 @@ public static String fixAvatar(final String imageUrl, int avatarSz) { return getPhotonImageUrl(imageUrl, avatarSz, avatarSz); // remove all other params, then add query string for size and "mystery man" default - return UrlUtils.removeQuery(imageUrl) + "?s=" + avatarSz + "&d=mm"; + return UrlUtils.removeQuery(imageUrl) + String.format("?s=%d&d=mm", avatarSz); } /* @@ -64,18 +64,18 @@ public static String getPhotonImageUrl(String imageUrl, int width, int height) { // see http://wp.tutsplus.com/tutorials/how-to-generate-website-screenshots-for-your-wordpress-site/ // ex: http://s.wordpress.com/mshots/v1/http%3A%2F%2Fnickbradbury.com?w=600 if (isMshotsUrl(imageUrl)) { - return imageUrl + "?w=" + width + "&h=" + height; + return imageUrl + String.format("?w=%d&h=%d", width, height); } // if both width & height are passed use the "resize" param, use only "w" or "h" if just // one of them is set, otherwise no query string final String query; if (width > 0 && height > 0) { - query = "?resize=" + width + "," + height; + query = String.format("?resize=%d,%d", width, height); } else if (width > 0) { - query = "?w=" + width; + query = String.format("?w=%d", width); } else if (height > 0) { - query = "?h=" + height; + query = String.format("?h=%d", height); } else { query = ""; }