From 5fca7968d84cd10412c0ed2934a318beb414f293 Mon Sep 17 00:00:00 2001 From: Maxime Biais Date: Mon, 8 Sep 2014 11:14:46 +0200 Subject: [PATCH] Revert "Revert "Merge pull request #1799 from wordpress-mobile/feature/1795-reader-render-attachments"" This reverts commit 6936da153fe0887cdc0e240ffc2ab22ca7cb5a4a. Conflicts: WordPress/src/main/java/org/wordpress/android/datasets/ReaderDatabase.java --- .../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 497d756ee377..bf275e56abdc 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) + String.format("?s=%d&d=mm", avatarSz); + return UrlUtils.removeQuery(imageUrl) + "?s=" + avatarSz + "&d=mm"; } /* @@ -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 + String.format("?w=%d&h=%d", width, height); + return imageUrl + "?w=" + width + "&h=" + 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 = String.format("?resize=%d,%d", width, height); + query = "?resize=" + width + "," + height; } else if (width > 0) { - query = String.format("?w=%d", width); + query = "?w=" + width; } else if (height > 0) { - query = String.format("?h=%d", height); + query = "?h=" + height; } else { query = ""; }