Added behavior/advanced card

pull/212/head
M66B 2 years ago
parent 4bb9d4c2a3
commit 55ac5a0309

@ -96,10 +96,10 @@ public class FragmentOptionsBehavior extends FragmentBase implements SharedPrefe
private Spinner spUndoTimeout; private Spinner spUndoTimeout;
private SwitchCompat swCollapseMultiple; private SwitchCompat swCollapseMultiple;
private SwitchCompat swAutoRead; private SwitchCompat swAutoRead;
private SwitchCompat swFlagSnoozed;
private SwitchCompat swAutoUnflag; private SwitchCompat swAutoUnflag;
private SwitchCompat swAutoImportant;
private SwitchCompat swResetImportance; private SwitchCompat swResetImportance;
private SwitchCompat swFlagSnoozed;
private SwitchCompat swAutoImportant;
private SwitchCompat swResetSnooze; private SwitchCompat swResetSnooze;
private SwitchCompat swAutoBlockSender; private SwitchCompat swAutoBlockSender;
private SwitchCompat swSwipeReply; private SwitchCompat swSwipeReply;
@ -167,10 +167,10 @@ public class FragmentOptionsBehavior extends FragmentBase implements SharedPrefe
swCollapseMarked = view.findViewById(R.id.swCollapseMarked); swCollapseMarked = view.findViewById(R.id.swCollapseMarked);
spUndoTimeout = view.findViewById(R.id.spUndoTimeout); spUndoTimeout = view.findViewById(R.id.spUndoTimeout);
swAutoRead = view.findViewById(R.id.swAutoRead); swAutoRead = view.findViewById(R.id.swAutoRead);
swFlagSnoozed = view.findViewById(R.id.swFlagSnoozed);
swAutoUnflag = view.findViewById(R.id.swAutoUnflag); swAutoUnflag = view.findViewById(R.id.swAutoUnflag);
swAutoImportant = view.findViewById(R.id.swAutoImportant);
swResetImportance = view.findViewById(R.id.swResetImportance); swResetImportance = view.findViewById(R.id.swResetImportance);
swFlagSnoozed = view.findViewById(R.id.swFlagSnoozed);
swAutoImportant = view.findViewById(R.id.swAutoImportant);
swResetSnooze = view.findViewById(R.id.swResetSnooze); swResetSnooze = view.findViewById(R.id.swResetSnooze);
swAutoBlockSender = view.findViewById(R.id.swAutoBlockSender); swAutoBlockSender = view.findViewById(R.id.swAutoBlockSender);
swSwipeReply = view.findViewById(R.id.swSwipeReply); swSwipeReply = view.findViewById(R.id.swSwipeReply);
@ -490,31 +490,31 @@ public class FragmentOptionsBehavior extends FragmentBase implements SharedPrefe
} }
}); });
swFlagSnoozed.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { swAutoUnflag.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override @Override
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) { public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
prefs.edit().putBoolean("flag_snoozed", checked).apply(); prefs.edit().putBoolean("autounflag", checked).apply();
} }
}); });
swAutoUnflag.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { swResetImportance.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override @Override
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) { public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
prefs.edit().putBoolean("autounflag", checked).apply(); prefs.edit().putBoolean("reset_importance", checked).apply();
} }
}); });
swAutoImportant.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { swFlagSnoozed.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override @Override
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) { public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
prefs.edit().putBoolean("auto_important", checked).apply(); prefs.edit().putBoolean("flag_snoozed", checked).apply();
} }
}); });
swResetImportance.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { swAutoImportant.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override @Override
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) { public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
prefs.edit().putBoolean("reset_importance", checked).apply(); prefs.edit().putBoolean("auto_important", checked).apply();
} }
}); });
@ -648,10 +648,10 @@ public class FragmentOptionsBehavior extends FragmentBase implements SharedPrefe
} }
swAutoRead.setChecked(prefs.getBoolean("autoread", false)); swAutoRead.setChecked(prefs.getBoolean("autoread", false));
swFlagSnoozed.setChecked(prefs.getBoolean("flag_snoozed", false));
swAutoUnflag.setChecked(prefs.getBoolean("autounflag", false)); swAutoUnflag.setChecked(prefs.getBoolean("autounflag", false));
swAutoImportant.setChecked(prefs.getBoolean("auto_important", false));
swResetImportance.setChecked(prefs.getBoolean("reset_importance", false)); swResetImportance.setChecked(prefs.getBoolean("reset_importance", false));
swFlagSnoozed.setChecked(prefs.getBoolean("flag_snoozed", false));
swAutoImportant.setChecked(prefs.getBoolean("auto_important", false));
swResetSnooze.setChecked(prefs.getBoolean("reset_snooze", true)); swResetSnooze.setChecked(prefs.getBoolean("reset_snooze", true));
swAutoBlockSender.setChecked(prefs.getBoolean("auto_block_sender", true)); swAutoBlockSender.setChecked(prefs.getBoolean("auto_block_sender", true));
swSwipeReply.setChecked(prefs.getBoolean("swipe_reply", false)); swSwipeReply.setChecked(prefs.getBoolean("swipe_reply", false));

@ -681,47 +681,84 @@
app:switchPadding="12dp" /> app:switchPadding="12dp" />
<androidx.appcompat.widget.SwitchCompat <androidx.appcompat.widget.SwitchCompat
android:id="@+id/swFlagSnoozed" android:id="@+id/swAutoUnflag"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="12dp" android:layout_marginTop="12dp"
android:text="@string/title_advanced_star_snoozed" android:text="@string/title_advanced_autounstar"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/swAutoRead" app:layout_constraintTop_toBottomOf="@id/swAutoRead"
app:switchPadding="12dp" /> app:switchPadding="12dp" />
<androidx.appcompat.widget.SwitchCompat <androidx.appcompat.widget.SwitchCompat
android:id="@+id/swAutoUnflag" android:id="@+id/swResetImportance"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="12dp" android:layout_marginTop="12dp"
android:text="@string/title_advanced_autounstar" android:text="@string/title_advanced_reset_importance"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/swFlagSnoozed" app:layout_constraintTop_toBottomOf="@id/swAutoUnflag"
app:switchPadding="12dp" /> app:switchPadding="12dp" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.cardview.widget.CardView>
<androidx.cardview.widget.CardView
android:id="@+id/cardAdvanced"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="3dp"
android:layout_marginTop="12dp"
app:cardBackgroundColor="?attr/colorCardBackground"
app:cardCornerRadius="6dp"
app:cardElevation="0dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/cardConversation">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingHorizontal="6dp"
android:paddingVertical="12dp">
<TextView
android:id="@+id/tvAdvanced"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:drawableStart="@drawable/twotone_warning_24"
android:drawablePadding="6dp"
android:gravity="center"
android:text="@string/title_advanced_advanced"
android:textAppearance="@style/TextAppearance.AppCompat.Large"
android:textColor="?attr/colorWarning"
android:textStyle="bold"
app:drawableTint="?attr/colorWarning"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<androidx.appcompat.widget.SwitchCompat <androidx.appcompat.widget.SwitchCompat
android:id="@+id/swAutoImportant" android:id="@+id/swFlagSnoozed"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="12dp" android:layout_marginTop="12dp"
android:text="@string/title_advanced_auto_important" android:text="@string/title_advanced_star_snoozed"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/swAutoUnflag" app:layout_constraintTop_toBottomOf="@id/tvAdvanced"
app:switchPadding="12dp" /> app:switchPadding="12dp" />
<androidx.appcompat.widget.SwitchCompat <androidx.appcompat.widget.SwitchCompat
android:id="@+id/swResetImportance" android:id="@+id/swAutoImportant"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="12dp" android:layout_marginTop="12dp"
android:text="@string/title_advanced_reset_importance" android:text="@string/title_advanced_auto_important"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/swAutoImportant" app:layout_constraintTop_toBottomOf="@id/swFlagSnoozed"
app:switchPadding="12dp" /> app:switchPadding="12dp" />
<androidx.appcompat.widget.SwitchCompat <androidx.appcompat.widget.SwitchCompat
@ -732,7 +769,7 @@
android:text="@string/title_advanced_cancel_snooze" android:text="@string/title_advanced_cancel_snooze"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/swResetImportance" app:layout_constraintTop_toBottomOf="@id/swAutoImportant"
app:switchPadding="12dp" /> app:switchPadding="12dp" />
<androidx.appcompat.widget.SwitchCompat <androidx.appcompat.widget.SwitchCompat
@ -759,5 +796,6 @@
app:switchPadding="12dp" /> app:switchPadding="12dp" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
</androidx.cardview.widget.CardView> </androidx.cardview.widget.CardView>
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
</eu.faircode.email.ScrollViewEx> </eu.faircode.email.ScrollViewEx>

@ -649,10 +649,10 @@
<string name="title_advanced_quick_actions">Show quick actions when messages are selected</string> <string name="title_advanced_quick_actions">Show quick actions when messages are selected</string>
<string name="title_advanced_folder_nav">Always go back to the folder list from a message list</string> <string name="title_advanced_folder_nav">Always go back to the folder list from a message list</string>
<string name="title_advanced_autoread">Automatically mark messages read on moving messages</string> <string name="title_advanced_autoread">Automatically mark messages read on moving messages</string>
<string name="title_advanced_star_snoozed">Automatically add star on snoozing messages</string>
<string name="title_advanced_autounstar">Automatically remove stars from messages on moving messages</string> <string name="title_advanced_autounstar">Automatically remove stars from messages on moving messages</string>
<string name="title_advanced_auto_important">Automatically make starred messages important</string>
<string name="title_advanced_reset_importance">Reset importance on moving messages</string> <string name="title_advanced_reset_importance">Reset importance on moving messages</string>
<string name="title_advanced_star_snoozed">Automatically add star on snoozing messages</string>
<string name="title_advanced_auto_important">Automatically make starred messages important</string>
<string name="title_advanced_cancel_snooze">Cancel snooze on moving messages</string> <string name="title_advanced_cancel_snooze">Cancel snooze on moving messages</string>
<string name="title_advanced_auto_block_sender">Automatically block the sender when reporting spam</string> <string name="title_advanced_auto_block_sender">Automatically block the sender when reporting spam</string>
<string name="title_advanced_swipe_reply">Swipe expanded messages to the right to reply</string> <string name="title_advanced_swipe_reply">Swipe expanded messages to the right to reply</string>

Loading…
Cancel
Save