|
|
@ -110,6 +110,7 @@ public class FragmentOptionsBehavior extends FragmentBase implements SharedPrefe
|
|
|
|
private SwitchCompat swMoveThreadAll;
|
|
|
|
private SwitchCompat swMoveThreadAll;
|
|
|
|
private SwitchCompat swMoveThreadSent;
|
|
|
|
private SwitchCompat swMoveThreadSent;
|
|
|
|
private SwitchCompat swSwipeTrashAll;
|
|
|
|
private SwitchCompat swSwipeTrashAll;
|
|
|
|
|
|
|
|
private SwitchCompat swGmailDeleteAll;
|
|
|
|
private Button btnDefaultFolder;
|
|
|
|
private Button btnDefaultFolder;
|
|
|
|
private TextView tvDefaultFolder;
|
|
|
|
private TextView tvDefaultFolder;
|
|
|
|
|
|
|
|
|
|
|
@ -129,7 +130,7 @@ public class FragmentOptionsBehavior extends FragmentBase implements SharedPrefe
|
|
|
|
"undo_timeout",
|
|
|
|
"undo_timeout",
|
|
|
|
"autoread", "flag_snoozed", "flag_unsnoozed", "autounflag", "auto_important", "reset_importance",
|
|
|
|
"autoread", "flag_snoozed", "flag_unsnoozed", "autounflag", "auto_important", "reset_importance",
|
|
|
|
"reset_snooze", "auto_block_sender", "auto_hide_answer", "swipe_reply",
|
|
|
|
"reset_snooze", "auto_block_sender", "auto_hide_answer", "swipe_reply",
|
|
|
|
"move_thread_all", "move_thread_sent", "swipe_trash_all",
|
|
|
|
"move_thread_all", "move_thread_sent", "swipe_trash_all", "gmail_delete_all",
|
|
|
|
"default_folder"
|
|
|
|
"default_folder"
|
|
|
|
));
|
|
|
|
));
|
|
|
|
|
|
|
|
|
|
|
@ -196,6 +197,7 @@ public class FragmentOptionsBehavior extends FragmentBase implements SharedPrefe
|
|
|
|
swMoveThreadAll = view.findViewById(R.id.swMoveThreadAll);
|
|
|
|
swMoveThreadAll = view.findViewById(R.id.swMoveThreadAll);
|
|
|
|
swMoveThreadSent = view.findViewById(R.id.swMoveThreadSent);
|
|
|
|
swMoveThreadSent = view.findViewById(R.id.swMoveThreadSent);
|
|
|
|
swSwipeTrashAll = view.findViewById(R.id.swSwipeTrashAll);
|
|
|
|
swSwipeTrashAll = view.findViewById(R.id.swSwipeTrashAll);
|
|
|
|
|
|
|
|
swGmailDeleteAll = view.findViewById(R.id.swGmailDeleteAll);
|
|
|
|
btnDefaultFolder = view.findViewById(R.id.btnDefaultFolder);
|
|
|
|
btnDefaultFolder = view.findViewById(R.id.btnDefaultFolder);
|
|
|
|
tvDefaultFolder = view.findViewById(R.id.tvDefaultFolder);
|
|
|
|
tvDefaultFolder = view.findViewById(R.id.tvDefaultFolder);
|
|
|
|
|
|
|
|
|
|
|
@ -626,6 +628,13 @@ public class FragmentOptionsBehavior extends FragmentBase implements SharedPrefe
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
swGmailDeleteAll.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
|
|
|
|
|
|
|
prefs.edit().putBoolean("gmail_delete_all", checked).apply();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
Intent tree = new Intent(Intent.ACTION_OPEN_DOCUMENT_TREE);
|
|
|
|
Intent tree = new Intent(Intent.ACTION_OPEN_DOCUMENT_TREE);
|
|
|
|
Helper.openAdvanced(getContext(), tree);
|
|
|
|
Helper.openAdvanced(getContext(), tree);
|
|
|
|
PackageManager pm = getContext().getPackageManager();
|
|
|
|
PackageManager pm = getContext().getPackageManager();
|
|
|
@ -802,6 +811,7 @@ public class FragmentOptionsBehavior extends FragmentBase implements SharedPrefe
|
|
|
|
swMoveThreadSent.setChecked(prefs.getBoolean("move_thread_sent", false));
|
|
|
|
swMoveThreadSent.setChecked(prefs.getBoolean("move_thread_sent", false));
|
|
|
|
swMoveThreadSent.setEnabled(!swMoveThreadAll.isChecked());
|
|
|
|
swMoveThreadSent.setEnabled(!swMoveThreadAll.isChecked());
|
|
|
|
swSwipeTrashAll.setChecked(prefs.getBoolean("swipe_trash_all", true));
|
|
|
|
swSwipeTrashAll.setChecked(prefs.getBoolean("swipe_trash_all", true));
|
|
|
|
|
|
|
|
swGmailDeleteAll.setChecked(prefs.getBoolean("gmail_delete_all", false));
|
|
|
|
|
|
|
|
|
|
|
|
tvDefaultFolder.setText(prefs.getString("default_folder", null));
|
|
|
|
tvDefaultFolder.setText(prefs.getString("default_folder", null));
|
|
|
|
} catch (Throwable ex) {
|
|
|
|
} catch (Throwable ex) {
|
|
|
|