Skip to content

Commit

Permalink
Added setCropWallpaperEnabledByDefault()
Browse files Browse the repository at this point in the history
- Added setCropWallpaperEnabledByDefault() to WallpaperBoardConfiguration
- Close #111
  • Loading branch information
danimahardhika authored Nov 18, 2017
1 parent b4931cd commit 2e470ab
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ public class WallpaperBoardConfiguration {
private @GridStyle int mWallpapersGrid = GridStyle.CARD;

private boolean mIsHighQualityPreviewEnabled = false;
private boolean mIsCropWallpaperEnabledByDefault = false;
private boolean mIsDashboardThemingEnabled = true;
private boolean mIsShadowEnabled = true;
private int mLatestWallpapersDisplayMax = 15;
Expand Down Expand Up @@ -80,6 +81,11 @@ public WallpaperBoardConfiguration setHighQualityPreviewEnabled(boolean highQual
return this;
}

public WallpaperBoardConfiguration setCropWallpaperEnabledByDefault(boolean enabled) {
mIsCropWallpaperEnabledByDefault = enabled;
return this;
}

public WallpaperBoardConfiguration setCrashReportEnabled(boolean crashReportEnabled) {
mIsCrashReportEnabled = crashReportEnabled;
return this;
Expand Down Expand Up @@ -127,6 +133,10 @@ public boolean isHighQualityPreviewEnabled() {
return mIsHighQualityPreviewEnabled;
}

public boolean isCropWallpaperEnabledByDefault() {
return mIsCropWallpaperEnabledByDefault;
}

public boolean isCrashReportEnabled() {
return mIsCrashReportEnabled;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,8 @@ public String getWallsDirectory() {
}

public boolean isCropWallpaper() {
return getSharedPreferences().getBoolean(KEY_CROP_WALLPAPER, false);
return getSharedPreferences().getBoolean(KEY_CROP_WALLPAPER,
WallpaperBoardApplication.getConfig().isCropWallpaperEnabledByDefault());
}

public void setCropWallpaper(boolean bool) {
Expand Down

0 comments on commit 2e470ab

Please sign in to comment.