Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Navid200 committed Feb 21, 2024
1 parent f7aca8a commit 0af0e00
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1124,9 +1124,6 @@ public static boolean shortTxId() {
return getTransmitterID().length() < 6;
}

public static boolean usingG5OrG6() { // Using G5 or G6 (Firefly or not, modified or not) but no other devices that depend on G6 basics like G7 or any such future devices
return (DexCollectionType.getDexCollectionType() == DexCollectionType.DexcomG5 || usingG6()) && !shortTxId();
}

private static Ob1Work enqueueCommand(BaseMessage tm, String msg) {
if (tm != null) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.eveningoutpost.dexdrip.utils;

import static com.eveningoutpost.dexdrip.g5model.Ob1G5StateMachine.usingG5OrG6;
import static com.eveningoutpost.dexdrip.utils.DexCollectionType.getBestCollectorHardwareName;
import static com.eveningoutpost.dexdrip.xdrip.gs;

import android.Manifest;
Expand Down Expand Up @@ -1732,7 +1732,7 @@ public boolean onPreferenceChange(Preference preference, Object newValue) {
}
}

if (!usingG5OrG6()) { // Remove battery options, from G5/G6/Dex1/G7 Debug Settings, if we are not using either G5 or G6
if (getBestCollectorHardwareName().equals("G7")) { // Remove battery options, from G5/G6/Dex1/G7 Debug Settings, if we are using G7 or One+
PreferenceScreen screen = (PreferenceScreen) findPreference("xdrip_plus_g5_extra_settings");
Preference pref = getPreferenceManager().findPreference("dex_battery_category");
screen.removePreference(pref);
Expand Down

0 comments on commit 0af0e00

Please sign in to comment.