Skip to content
This repository has been archived by the owner on Oct 26, 2023. It is now read-only.

Commit

Permalink
un-implemented preference options for #137
Browse files Browse the repository at this point in the history
  • Loading branch information
fennifith committed Aug 27, 2018
1 parent 677253f commit cffdd7f
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,8 @@ public String getName(Context context) {
}

public boolean shouldShowHeadsUp(Context context) {
return (boolean) PreferenceData.STATUS_NOTIFICATIONS_HEADS_UP.getValue(context) && (priority >= NotificationCompat.PRIORITY_HIGH || Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) && isAlert;
return //(boolean) PreferenceData.STATUS_NOTIFICATIONS_HEADS_UP.getValue(context) && TODO: #137
(priority >= NotificationCompat.PRIORITY_HIGH || Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) && isAlert;
}

public boolean shouldHideStatusBar() {
Expand Down
6 changes: 3 additions & 3 deletions app/src/main/java/com/james/status/data/PreferenceData.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
public enum PreferenceData {
STATUS_ENABLED(false),
STATUS_NOTIFICATIONS_COMPAT(false),
STATUS_NOTIFICATIONS_HEADS_UP(false),
//STATUS_NOTIFICATIONS_HEADS_UP(false), TODO: #137
STATUS_COLOR_AUTO(true),
STATUS_COLOR(Color.BLACK),
STATUS_HOME_TRANSPARENT(true),
Expand All @@ -34,9 +34,9 @@ public enum PreferenceData {
STATUS_LIGHT_ICON_COLOR(Color.WHITE),
STATUS_LIGHT_ICON_TEXT_COLOR(Color.WHITE),
STATUS_DARK_ICONS(true),
STATUS_TINTED_ICONS(false),
//STATUS_TINTED_ICONS(false), TODO: #137
STATUS_PREVENT_ICON_OVERLAP(false),
STATUS_BUMP_MODE(false),
//STATUS_BUMP_MODE(false), TODO: #137
STATUS_BACKGROUND_ANIMATIONS(true),
STATUS_ICON_ANIMATIONS(true),
STATUS_HIDE_ON_VOLUME(Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP),
Expand Down
6 changes: 3 additions & 3 deletions app/src/main/java/com/james/status/data/icon/IconData.java
Original file line number Diff line number Diff line change
Expand Up @@ -303,16 +303,16 @@ public final int getGravity() {
*/
public void setBackgroundColor(@ColorInt int color) {
backgroundColor = color;
if (PreferenceData.STATUS_TINTED_ICONS.getValue(getContext())) {
/*if (PreferenceData.STATUS_TINTED_ICONS.getValue(getContext())) { TODO: #137
iconColor.to(color);
textColor.to(color);
} else {
} else {*/
boolean isIconContrast = PreferenceData.STATUS_DARK_ICONS.getValue(getContext());
iconColor.to(isIconContrast && ColorUtils.getDifference(color, iconColor.getDefault()) < 100 ?
(ColorUtils.isColorDark(color) ? defaultIconLightColor : defaultIconDarkColor) : iconColor.getDefault());
textColor.to(isIconContrast && ColorUtils.getDifference(color, textColor.getDefault()) < 100 ?
(ColorUtils.isColorDark(color) ? defaultTextLightColor : defaultTextDarkColor) : textColor.getDefault());
}
//}

requestReDraw();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container,
),
recreateListener
),
new BooleanPreferenceData(
/*new BooleanPreferenceData( TODO: #137
getContext(),
new BasePreferenceData.Identifier<Boolean>(
PreferenceData.STATUS_TINTED_ICONS,
Expand All @@ -122,7 +122,7 @@ public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container,
),
recreateListener
),
/*new BooleanPreferenceData(
new BooleanPreferenceData(
getContext(),
new BasePreferenceData.Identifier<Boolean>(
PreferenceData.STATUS_BUMP_MODE,
Expand Down

0 comments on commit cffdd7f

Please sign in to comment.