Skip to content

Commit dea1fbf

Browse files
committed
remove extraneous static field
1 parent 73dbd93 commit dea1fbf

File tree

2 files changed

+10
-12
lines changed

2 files changed

+10
-12
lines changed

WordPressUtils/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ android {
2828
buildToolsVersion "21.1.1"
2929

3030
defaultConfig {
31-
versionName "1.3.0"
31+
versionName "1.4.0"
3232
minSdkVersion 14
3333
targetSdkVersion 19
3434
}

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

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -562,17 +562,15 @@ public static Bitmap getRoundedEdgeBitmap(final Bitmap bitmap, int radius) {
562562
/**
563563
* Get the maximum size a thumbnail can be to fit in either portrait or landscape orientations.
564564
*/
565-
private static int sMaximumThumbnailWidthForEditor;
566565
public static int getMaximumThumbnailWidthForEditor(Context context) {
567-
if (sMaximumThumbnailWidthForEditor == 0) {
568-
Point size = DisplayUtils.getDisplayPixelSize(context);
569-
int screenWidth = size.x;
570-
int screenHeight = size.y;
571-
sMaximumThumbnailWidthForEditor = (screenWidth > screenHeight) ? screenHeight : screenWidth;
572-
// 48dp of padding on each side so you can still place the cursor next to the image.
573-
int padding = DisplayUtils.dpToPx(context, 48) * 2;
574-
sMaximumThumbnailWidthForEditor -= padding;
575-
}
576-
return sMaximumThumbnailWidthForEditor;
566+
int maximumThumbnailWidthForEditor;
567+
Point size = DisplayUtils.getDisplayPixelSize(context);
568+
int screenWidth = size.x;
569+
int screenHeight = size.y;
570+
maximumThumbnailWidthForEditor = (screenWidth > screenHeight) ? screenHeight : screenWidth;
571+
// 48dp of padding on each side so you can still place the cursor next to the image.
572+
int padding = DisplayUtils.dpToPx(context, 48) * 2;
573+
maximumThumbnailWidthForEditor -= padding;
574+
return maximumThumbnailWidthForEditor;
577575
}
578576
}

0 commit comments

Comments
 (0)