mirror of
https://github.com/ArcaneChat/android.git
synced 2026-07-03 14:05:24 +02:00
revert pref string constants
This commit is contained in:
@@ -27,6 +27,7 @@ public class DcHelper {
|
||||
public static final String CONFIG_SENTBOX_WATCH = "sentbox_watch";
|
||||
public static final String CONFIG_MVBOX_WATCH = "mvbox_watch";
|
||||
public static final String CONFIG_MVBOX_MOVE = "mvbox_move";
|
||||
public static final String CONFIG_SHOW_EMAILS = "show_emails";
|
||||
|
||||
public static ApplicationDcContext getContext(Context context) {
|
||||
return ApplicationContext.getInstance(context).dcContext;
|
||||
|
||||
@@ -21,7 +21,6 @@ import org.thoughtcrime.securesms.ApplicationPreferencesActivity;
|
||||
import org.thoughtcrime.securesms.LogViewActivity;
|
||||
import org.thoughtcrime.securesms.R;
|
||||
import org.thoughtcrime.securesms.permissions.Permissions;
|
||||
import org.thoughtcrime.securesms.util.Prefs;
|
||||
import org.thoughtcrime.securesms.util.ScreenLockUtil;
|
||||
import org.thoughtcrime.securesms.util.Util;
|
||||
import org.thoughtcrime.securesms.util.views.ProgressDialog;
|
||||
@@ -52,38 +51,38 @@ public class AdvancedPreferenceFragment extends ListSummaryPreferenceFragment
|
||||
public void onCreate(Bundle paramBundle) {
|
||||
super.onCreate(paramBundle);
|
||||
|
||||
Preference sendAsm = this.findPreference(Prefs.AUTOCRYPT_SETUP_MESSAGE);
|
||||
Preference sendAsm = this.findPreference("pref_send_autocrypt_setup_message");
|
||||
sendAsm.setOnPreferenceClickListener(new SendAsmListener());
|
||||
|
||||
preferE2eeCheckbox = (CheckBoxPreference) this.findPreference(Prefs.PREFER_E2EE);
|
||||
preferE2eeCheckbox = (CheckBoxPreference) this.findPreference("pref_prefer_e2ee");
|
||||
preferE2eeCheckbox.setOnPreferenceChangeListener(new PreferE2eeListener());
|
||||
|
||||
inboxWatchCheckbox = (CheckBoxPreference) this.findPreference(Prefs.INBOX_WATCH);
|
||||
inboxWatchCheckbox = (CheckBoxPreference) this.findPreference("pref_inbox_watch");
|
||||
inboxWatchCheckbox.setOnPreferenceChangeListener((preference, newValue) ->
|
||||
handleImapCheck(preference, newValue, CONFIG_INBOX_WATCH)
|
||||
);
|
||||
|
||||
sentboxWatchCheckbox = (CheckBoxPreference) this.findPreference(Prefs.SENTBOX_WATCH);
|
||||
sentboxWatchCheckbox = (CheckBoxPreference) this.findPreference("pref_sentbox_watch");
|
||||
sentboxWatchCheckbox.setOnPreferenceChangeListener((preference, newValue) ->
|
||||
handleImapCheck(preference, newValue, CONFIG_SENTBOX_WATCH)
|
||||
);
|
||||
|
||||
mvboxWatchCheckbox = (CheckBoxPreference) this.findPreference(Prefs.MVBOX_WATCH);
|
||||
mvboxWatchCheckbox = (CheckBoxPreference) this.findPreference("pref_mvbox_watch");
|
||||
mvboxWatchCheckbox.setOnPreferenceChangeListener((preference, newValue) ->
|
||||
handleImapCheck(preference, newValue, CONFIG_MVBOX_WATCH)
|
||||
);
|
||||
|
||||
mvboxMoveCheckbox = (CheckBoxPreference) this.findPreference(Prefs.MVBOX_MOVE);
|
||||
mvboxMoveCheckbox = (CheckBoxPreference) this.findPreference("pref_mvbox_move");
|
||||
mvboxMoveCheckbox.setOnPreferenceChangeListener((preference, newValue) -> {
|
||||
boolean enabled = (Boolean) newValue;
|
||||
dcContext.setConfigInt(CONFIG_MVBOX_MOVE, enabled? 1 : 0);
|
||||
return true;
|
||||
});
|
||||
|
||||
Preference manageKeys = this.findPreference(Prefs.MANAGE_KEYS);
|
||||
Preference manageKeys = this.findPreference("pref_manage_keys");
|
||||
manageKeys.setOnPreferenceClickListener(new ManageKeysListener());
|
||||
|
||||
Preference submitDebugLog = this.findPreference(Prefs.VIEW_LOG);
|
||||
Preference submitDebugLog = this.findPreference("pref_view_log");
|
||||
submitDebugLog.setOnPreferenceClickListener(new ViewLogListener());
|
||||
}
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@ import org.thoughtcrime.securesms.util.ScreenLockUtil;
|
||||
import org.thoughtcrime.securesms.util.Util;
|
||||
|
||||
import static android.app.Activity.RESULT_OK;
|
||||
import static org.thoughtcrime.securesms.connect.DcHelper.CONFIG_SHOW_EMAILS;
|
||||
|
||||
public class ChatsPreferenceFragment extends ListSummaryPreferenceFragment {
|
||||
private static final String TAG = ChatsPreferenceFragment.class.getSimpleName();
|
||||
@@ -44,11 +45,11 @@ public class ChatsPreferenceFragment extends ListSummaryPreferenceFragment {
|
||||
showEmails = (ListPreferenceWithSummary) this.findPreference(Prefs.SHOW_EMAILS);
|
||||
showEmails.setOnPreferenceChangeListener((preference, newValue) -> {
|
||||
updateListSummary(preference, newValue);
|
||||
dcContext.setConfigInt("show_emails", Util.objectToInt(newValue));
|
||||
dcContext.setConfigInt(CONFIG_SHOW_EMAILS, Util.objectToInt(newValue));
|
||||
return true;
|
||||
});
|
||||
|
||||
Preference backup = this.findPreference(Prefs.BACKUP);
|
||||
Preference backup = this.findPreference("pref_backup");
|
||||
backup.setOnPreferenceClickListener(new BackupListener());
|
||||
|
||||
// trimEnabledCheckbox = (CheckBoxPreference) findPreference("pref_trim_threads");
|
||||
|
||||
@@ -56,15 +56,6 @@ public class Prefs {
|
||||
|
||||
public static final String SHOW_EMAILS = "pref_show_emails";
|
||||
public static final String COMPRESSION = "pref_compression";
|
||||
public static final String BACKUP = "pref_backup";
|
||||
public static final String AUTOCRYPT_SETUP_MESSAGE = "pref_send_autocrypt_setup_message";
|
||||
public static final String PREFER_E2EE = "pref_prefer_e2ee";
|
||||
public static final String INBOX_WATCH = "pref_inbox_watch";
|
||||
public static final String SENTBOX_WATCH = "pref_sentbox_watch";
|
||||
public static final String MVBOX_WATCH = "pref_mvbox_watch";
|
||||
public static final String MVBOX_MOVE = "pref_mvbox_move";
|
||||
public static final String MANAGE_KEYS = "pref_manage_keys";
|
||||
public static final String VIEW_LOG = "pref_view_log";
|
||||
|
||||
public static final String NOTIFICATION_PRIVACY_PREF = "pref_notification_privacy";
|
||||
public static final String NOTIFICATION_PRIORITY_PREF = "pref_notification_priority";
|
||||
|
||||
Reference in New Issue
Block a user