Skip to content

Commit

Permalink
Reformat seconds
Browse files Browse the repository at this point in the history
Signed-off-by: DHD2280 <[email protected]>
  • Loading branch information
DHD2280 committed Dec 13, 2024
1 parent 0c91188 commit 264169c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,6 @@
import java.util.Collections;
import java.util.List;

import it.dhd.oneplusui.preference.OplusListPreference;
import it.dhd.oneplusui.preference.OplusSliderPreference;
import it.dhd.oneplusui.preference.OplusSwitchPreference;
import it.dhd.oxygencustomizer.BuildConfig;
Expand Down Expand Up @@ -904,9 +903,6 @@ public static boolean isEnabled(String key) {
instance.mPreferences.getBoolean("fix_lag_switch", false) &&
!instance.mPreferences.getBoolean("fix_lag_force_all_apps", false);

case "SleepOnFlatScreen" ->
instance.mPreferences.getBoolean("SleepOnFlatScreen", false);

case "moreLogging" -> !BuildConfig.VERSION_NAME.contains("nightly");

default -> true;
Expand Down Expand Up @@ -998,12 +994,12 @@ public static String getSummary(Context fragmentCompat, @NonNull String key) {
instance.mPreferences.getSliderInt("status_bar_clock_size", 12) + "sp";
case "status_bar_clock_auto_hide_hduration" ->
fragmentCompat.getString(R.string.status_bar_clock_auto_hide_hdur_summary) + "\n" +
instance.mPreferences.getSliderInt("status_bar_clock_auto_hide_hduration", 60) + " " +
fragmentCompat.getString(R.string.seconds);
String.format(fragmentCompat.getString(R.string.duration_seconds),
instance.mPreferences.getSliderInt("status_bar_clock_auto_hide_hduration", 60));
case "status_bar_clock_auto_hide_sduration" ->
fragmentCompat.getString(R.string.status_bar_clock_auto_hide_sdur_summary) + "\n" +
instance.mPreferences.getSliderInt("status_bar_clock_auto_hide_sduration", 5) + " " +
fragmentCompat.getString(R.string.seconds);
String.format(fragmentCompat.getString(R.string.duration_seconds),
instance.mPreferences.getSliderInt("status_bar_clock_auto_hide_sduration", 5));
case NOTIF_TRANSPARENCY_VALUE ->
String.valueOf(instance.mPreferences.getSliderInt(NOTIF_TRANSPARENCY_VALUE, 25));

Expand Down Expand Up @@ -1139,8 +1135,11 @@ public static String getSummary(Context fragmentCompat, @NonNull String key) {

// Buttons
case "volbtn_torch_timeout" ->
instance.mPreferences.getSliderInt("volbtn_torch_timeout", 5) + " " +
fragmentCompat.getString(R.string.seconds);
String.format(fragmentCompat.getString(R.string.duration_seconds), instance.mPreferences.getSliderInt("volbtn_torch_timeout", 5));

// Screen Off On Flat
case "FlatStandbyTime" ->
String.format(fragmentCompat.getString(R.string.duration_seconds), instance.mPreferences.getSliderInt("FlatStandbyTime", 5));

default -> null;
};
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@
<string name="battery_level_percentage">Battery Level</string>
<string name="percentage_text" translatable="false">%d%%</string>
<string name="seconds">Seconds</string>
<string name="duration_seconds">%d seconds</string>
<string name="milliseconds">Milliseconds</string>
<string name="steps">Steps</string>
<string name="general_color_accent1">Accent 1</string>
Expand Down

0 comments on commit 264169c

Please sign in to comment.