Skip to content

Commit afab8b6

Browse files
committed
WIP, untested: Adapt to a rename on the core side
1 parent 3b11fea commit afab8b6

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

src/main/java/org/thoughtcrime/securesms/connect/DcHelper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public class DcHelper {
7575
public static final String CONFIG_VERIFIED_ONE_ON_ONE_CHATS = "verified_one_on_one_chats";
7676
public static final String CONFIG_WEBXDC_REALTIME_ENABLED = "webxdc_realtime_enabled";
7777
public static final String CONFIG_PRIVATE_TAG = "private_tag";
78-
public static final String CONFIG_SEND_STATISTICS = "send_statistics";
78+
public static final String CONFIG_STATS_SENDING = "stats_sending";
7979

8080
public static DcContext getContext(@NonNull Context context) {
8181
return ApplicationContext.getInstance(context).dcContext;

src/main/java/org/thoughtcrime/securesms/preferences/AdvancedPreferenceFragment.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import static org.thoughtcrime.securesms.connect.DcHelper.CONFIG_BCC_SELF;
66
import static org.thoughtcrime.securesms.connect.DcHelper.CONFIG_MVBOX_MOVE;
77
import static org.thoughtcrime.securesms.connect.DcHelper.CONFIG_ONLY_FETCH_MVBOX;
8-
import static org.thoughtcrime.securesms.connect.DcHelper.CONFIG_SEND_STATISTICS;
8+
import static org.thoughtcrime.securesms.connect.DcHelper.CONFIG_STATS_SENDING;
99
import static org.thoughtcrime.securesms.connect.DcHelper.CONFIG_SENTBOX_WATCH;
1010
import static org.thoughtcrime.securesms.connect.DcHelper.CONFIG_SHOW_EMAILS;
1111
import static org.thoughtcrime.securesms.connect.DcHelper.CONFIG_WEBXDC_REALTIME_ENABLED;
@@ -215,11 +215,11 @@ public void onCreate(Bundle paramBundle) {
215215
});
216216
}
217217

218-
selfReportingCheckbox = this.findPreference("pref_send_statistics");
218+
selfReportingCheckbox = this.findPreference("pref_stats_sending");
219219
if (selfReportingCheckbox != null) {
220220
selfReportingCheckbox.setOnPreferenceChangeListener((preference, newValue) -> {
221221
boolean enabled = (Boolean) newValue;
222-
dcContext.setConfigInt(CONFIG_SEND_STATISTICS, enabled? 1 : 0);
222+
dcContext.setConfigInt(CONFIG_STATS_SENDING, enabled? 1 : 0);
223223

224224
if (enabled) {
225225
new AlertDialog.Builder(getActivity())
@@ -276,7 +276,7 @@ public void onResume() {
276276
updateListSummary(showEmails, value);
277277

278278
sentboxWatchCheckbox.setChecked(0!=dcContext.getConfigInt(CONFIG_SENTBOX_WATCH));
279-
selfReportingCheckbox.setChecked(0!=dcContext.getConfigInt(CONFIG_SEND_STATISTICS));
279+
selfReportingCheckbox.setChecked(0!=dcContext.getConfigInt(CONFIG_STATS_SENDING));
280280
bccSelfCheckbox.setChecked(0!=dcContext.getConfigInt(CONFIG_BCC_SELF));
281281
mvboxMoveCheckbox.setChecked(0!=dcContext.getConfigInt(CONFIG_MVBOX_MOVE));
282282
onlyFetchMvboxCheckbox.setChecked(0!=dcContext.getConfigInt(CONFIG_ONLY_FETCH_MVBOX));

src/main/res/xml/preferences_advanced.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
<org.thoughtcrime.securesms.components.SwitchPreferenceCompat
1515
android:defaultValue="false"
16-
android:key="pref_send_statistics"
16+
android:key="pref_stats_sending"
1717
android:title="@string/send_stats_to_devs"
1818
android:summary="@string/send_stats_to_devs_explanation"/>
1919

0 commit comments

Comments
 (0)