Skip to content

Commit

Permalink
Fix #20867
Browse files Browse the repository at this point in the history
  • Loading branch information
Chumva committed Sep 23, 2024
1 parent f2e83fe commit e0b781e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -135,19 +135,19 @@ private void readButtonState(@NonNull JSONObject json) {
buttonState.setEnabled(object.getBoolean("enabled"));

String iconName = object.optString("icon");
if (Algorithms.isEmpty(iconName)) {
if (!Algorithms.isEmpty(iconName)) {
buttonState.getIconPref().set(iconName);
}
int size = object.optInt("size");
if (size > 0) {
buttonState.getSizePref().set(size);
}
int cornerRadius = object.optInt("corner_radius");
if (cornerRadius > 0) {
if (cornerRadius >= 0) {
buttonState.getCornerRadiusPref().set(cornerRadius);
}
float opacity = (float) object.optDouble("opacity");
if (opacity > 0) {
if (opacity >= 0) {
buttonState.getOpacityPref().set(opacity);
}
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ public boolean isDefaultButton() {
@Override
public ButtonAppearanceParams createAppearanceParams() {
ButtonAppearanceParams appearanceParams = super.createAppearanceParams();
if (!iconPref.isSet()) {
if (Algorithms.isEmpty(iconPref.get())) {
if (isSingleAction()) {
int iconId = getQuickActions().get(0).getIconRes(app);
if (iconId > 0) {
Expand Down

0 comments on commit e0b781e

Please sign in to comment.