mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-05 16:43:26 +02:00
Added option to always show date and time
This commit is contained in:
@@ -71,6 +71,7 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
|
||||
private SwitchCompat swDateWeek;
|
||||
private SwitchCompat swDateFixed;
|
||||
private SwitchCompat swDateBold;
|
||||
private SwitchCompat swDateTime;
|
||||
private SwitchCompat swCategory;
|
||||
private SwitchCompat swCards;
|
||||
private SwitchCompat swBeige;
|
||||
@@ -198,7 +199,7 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
|
||||
|
||||
private final static String[] RESET_OPTIONS = new String[]{
|
||||
"theme", "startup",
|
||||
"date", "date_week", "date_fixed", "date_bold", "group_category",
|
||||
"date", "date_week", "date_fixed", "date_bold", "date_time", "group_category",
|
||||
"cards", "beige", "tabular_card_bg", "shadow_unread", "shadow_border", "shadow_highlight", "dividers",
|
||||
"portrait2", "portrait2c", "landscape", "close_pane", "open_pane", "column_width",
|
||||
"hide_toolbar", "nav_options", "nav_categories", "nav_last_sync", "nav_count", "nav_unseen_drafts", "nav_count_pinned", "navbar_colorize",
|
||||
@@ -239,6 +240,7 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
|
||||
swDateWeek = view.findViewById(R.id.swDateWeek);
|
||||
swDateFixed = view.findViewById(R.id.swDateFixed);
|
||||
swDateBold = view.findViewById(R.id.swDateBold);
|
||||
swDateTime = view.findViewById(R.id.swDateTime);
|
||||
swCategory = view.findViewById(R.id.swCategory);
|
||||
swCards = view.findViewById(R.id.swCards);
|
||||
swBeige = view.findViewById(R.id.swBeige);
|
||||
@@ -445,6 +447,13 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
|
||||
}
|
||||
});
|
||||
|
||||
swDateTime.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
||||
prefs.edit().putBoolean("date_time", checked).apply();
|
||||
}
|
||||
});
|
||||
|
||||
swCategory.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
||||
@@ -1425,6 +1434,7 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
|
||||
swDateFixed.setEnabled(!swDate.isChecked());
|
||||
swDateBold.setChecked(prefs.getBoolean("date_bold", false));
|
||||
swDateBold.setEnabled(swDate.isChecked() || swDateFixed.isChecked());
|
||||
swDateTime.setChecked(prefs.getBoolean("date_time", false));
|
||||
swCategory.setChecked(prefs.getBoolean("group_category", false));
|
||||
swCards.setChecked(prefs.getBoolean("cards", true));
|
||||
swBeige.setChecked(prefs.getBoolean("beige", true));
|
||||
|
||||
Reference in New Issue
Block a user