Added button configuration for Gmail labels

pull/214/head
M66B 9 months ago
parent 66adbff649
commit a9b5a95f0b

@ -2318,6 +2318,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
boolean button_move = prefs.getBoolean("button_move", true);
boolean button_copy = prefs.getBoolean("button_copy", false);
boolean button_keywords = prefs.getBoolean("button_keywords", false);
boolean button_labels = prefs.getBoolean("button_labels", true);
boolean button_notes = prefs.getBoolean("button_notes", false);
boolean button_seen = prefs.getBoolean("button_seen", false);
boolean button_hide = prefs.getBoolean("button_hide", false);
@ -2370,7 +2371,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
ibHide.setVisibility(tools && button_hide && !outbox ? View.VISIBLE : View.GONE);
ibSeen.setVisibility(tools && button_seen && !outbox && seen ? View.VISIBLE : View.GONE);
ibNotes.setVisibility(tools && button_notes && !outbox ? View.VISIBLE : View.GONE);
ibLabels.setVisibility(tools && labels_header && labels ? View.VISIBLE : View.GONE);
ibLabels.setVisibility(tools && labels_header && labels && button_labels ? View.VISIBLE : View.GONE);
ibKeywords.setVisibility(tools && button_keywords && keywords ? View.VISIBLE : View.GONE);
ibCopy.setVisibility(tools && button_copy && move ? View.VISIBLE : View.GONE);
ibMove.setVisibility(tools && button_move && move ? View.VISIBLE : View.GONE);

@ -53,6 +53,7 @@ public class FragmentDialogButtons extends FragmentDialogBase {
final CheckBox cbNotes = dview.findViewById(R.id.cbNotes);
final CheckBox cbRule = dview.findViewById(R.id.cbRule);
final CheckBox cbKeywords = dview.findViewById(R.id.cbKeywords);
final CheckBox cbLabels = dview.findViewById(R.id.cbLabels);
final CheckBox cbSearch = dview.findViewById(R.id.cbSearch);
final CheckBox cbSearchText = dview.findViewById(R.id.cbSearchText);
final CheckBox cbTranslate = dview.findViewById(R.id.cbTranslate);
@ -81,6 +82,7 @@ public class FragmentDialogButtons extends FragmentDialogBase {
cbNotes.setChecked(prefs.getBoolean("button_notes", false));
cbRule.setChecked(prefs.getBoolean("button_rule", false));
cbKeywords.setChecked(prefs.getBoolean("button_keywords", false));
cbLabels.setChecked(prefs.getBoolean("button_labels", true));
cbSearch.setChecked(prefs.getBoolean("button_search", false));
cbSearchText.setChecked(prefs.getBoolean("button_search_text", false));
cbTranslate.setChecked(prefs.getBoolean("button_translate", true));
@ -112,6 +114,7 @@ public class FragmentDialogButtons extends FragmentDialogBase {
editor.putBoolean("button_notes", cbNotes.isChecked());
editor.putBoolean("button_rule", cbRule.isChecked());
editor.putBoolean("button_keywords", cbKeywords.isChecked());
editor.putBoolean("button_labels", cbLabels.isChecked());
editor.putBoolean("button_search", cbSearch.isChecked());
editor.putBoolean("button_search_text", cbSearchText.isChecked());
editor.putBoolean("button_translate", cbTranslate.isChecked());

@ -109,6 +109,19 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/cbCopy" />
<CheckBox
android:id="@+id/cbLabels"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:drawableEnd="@drawable/twotone_label_important_24"
android:drawablePadding="6dp"
android:text="@string/title_labels_btn"
android:textAppearance="@style/TextAppearance.AppCompat.Small"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/cbKeywords" />
<CheckBox
android:id="@+id/cbNotes"
android:layout_width="0dp"
@ -120,7 +133,7 @@
android:textAppearance="@style/TextAppearance.AppCompat.Small"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/cbKeywords" />
app:layout_constraintTop_toBottomOf="@id/cbLabels" />
<CheckBox
android:id="@+id/cbSeen"

@ -1516,6 +1516,7 @@
<string name="title_move">Move</string>
<string name="title_copy_btn">Copy</string>
<string name="title_keywords_btn">Keywords</string>
<string name="title_labels_btn">Labels (Gmail only)</string>
<string name="title_unsubscribe">Unsubscribe</string>
<string name="title_message_rule">Create rule</string>
<string name="title_no_junk">Not spam</string>

Loading…
Cancel
Save