Skip to content

Commit 8568fd3

Browse files
authored
Merge pull request #4078 from Navid200/Navid_2025_07_07
Follower Chime menu update
2 parents c1264dc + 3451591 commit 8568fd3

File tree

3 files changed

+22
-11
lines changed

3 files changed

+22
-11
lines changed

app/src/main/java/com/eveningoutpost/dexdrip/utils/Preferences.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1432,6 +1432,8 @@ public boolean onPreferenceChange(Preference preference, Object newValue) {
14321432
}
14331433
}
14341434

1435+
final Preference xSyncFollowChime = findPreference("follower_chime");
1436+
14351437

14361438
if (collectionType != DexCollectionType.WebFollow) {
14371439
try {
@@ -1863,6 +1865,14 @@ public boolean onPreferenceChange(Preference preference, Object newValue) {
18631865
}
18641866
}
18651867

1868+
if (collectionType != DexCollectionType.Follower) {
1869+
try {
1870+
collectionCategory.removePreference(xSyncFollowChime);
1871+
} catch (Exception e) {
1872+
//
1873+
}
1874+
}
1875+
18661876
if (getBestCollectorHardwareName().equals("G7")) { // Remove battery options, from G5/G6/Dex1/G7 Debug Settings, if we are using G7 or One+
18671877
try {
18681878
PreferenceScreen screen = (PreferenceScreen) findPreference("xdrip_plus_g5_extra_settings");
@@ -2580,6 +2590,10 @@ public boolean onPreferenceChange(Preference preference, Object newValue) {
25802590
collectionCategory.addPreference(nsFollowLag);
25812591
}
25822592

2593+
if (collectionType == DexCollectionType.Follower) {
2594+
collectionCategory.addPreference(xSyncFollowChime);
2595+
}
2596+
25832597

25842598
String stringValue = newValue.toString();
25852599
if (preference instanceof ListPreference) {

app/src/main/res/xml/pref_data_source.xml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,14 @@
242242
android:summary="Your account and follower app are from the USA"
243243
android:title="US Servers" />
244244

245+
<SwitchPreference
246+
android:defaultValue="false"
247+
android:key="follower_chime"
248+
android:summary="@string/notify_data_arrives_master"
249+
android:switchTextOff="@string/short_off_text_for_switches"
250+
android:switchTextOn="@string/short_on_text_for_switches"
251+
android:title="@string/follower_chime_new" />
252+
245253
<ListPreference
246254
android:defaultValue="gb"
247255
android:entries="@array/carelinkCountryEntries"

app/src/main/res/xml/pref_notifications.xml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -400,17 +400,6 @@
400400
android:switchTextOn="@string/short_on_text_for_switches"
401401
android:title="@string/title_sens_expiry_notify" />
402402
</PreferenceScreen>
403-
<PreferenceScreen
404-
android:key="@string/other_xdrip_plus_alerts"
405-
android:title="@string/other_xdrip_plus_alerts">
406-
<SwitchPreference
407-
android:defaultValue="false"
408-
android:key="follower_chime"
409-
android:summary="@string/notify_data_arrives_master"
410-
android:switchTextOff="@string/short_off_text_for_switches"
411-
android:switchTextOn="@string/short_on_text_for_switches"
412-
android:title="@string/follower_chime_new" />
413-
</PreferenceScreen>
414403
</PreferenceScreen>
415404
</PreferenceCategory>
416405
</PreferenceScreen>

0 commit comments

Comments
 (0)