Skip to content

Commit

Permalink
remove extraneous static field
Browse files Browse the repository at this point in the history
  • Loading branch information
maxme committed Feb 9, 2015
1 parent 00c64b5 commit 590b9a7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 deletions.
2 changes: 1 addition & 1 deletion WordPressUtils/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ android {
buildToolsVersion "21.1.1"

defaultConfig {
versionName "1.3.0"
versionName "1.4.0"
minSdkVersion 14
targetSdkVersion 19
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -562,17 +562,15 @@ public static Bitmap getRoundedEdgeBitmap(final Bitmap bitmap, int radius) {
/**
* Get the maximum size a thumbnail can be to fit in either portrait or landscape orientations.
*/
private static int sMaximumThumbnailWidthForEditor;
public static int getMaximumThumbnailWidthForEditor(Context context) {
if (sMaximumThumbnailWidthForEditor == 0) {
Point size = DisplayUtils.getDisplayPixelSize(context);
int screenWidth = size.x;
int screenHeight = size.y;
sMaximumThumbnailWidthForEditor = (screenWidth > screenHeight) ? screenHeight : screenWidth;
// 48dp of padding on each side so you can still place the cursor next to the image.
int padding = DisplayUtils.dpToPx(context, 48) * 2;
sMaximumThumbnailWidthForEditor -= padding;
}
return sMaximumThumbnailWidthForEditor;
int maximumThumbnailWidthForEditor;
Point size = DisplayUtils.getDisplayPixelSize(context);
int screenWidth = size.x;
int screenHeight = size.y;
maximumThumbnailWidthForEditor = (screenWidth > screenHeight) ? screenHeight : screenWidth;
// 48dp of padding on each side so you can still place the cursor next to the image.
int padding = DisplayUtils.dpToPx(context, 48) * 2;
maximumThumbnailWidthForEditor -= padding;
return maximumThumbnailWidthForEditor;
}
}

0 comments on commit 590b9a7

Please sign in to comment.