mirror of
https://github.com/M66B/FairEmail.git
synced 2025-02-24 15:11:03 +00:00
Added junk hint
This commit is contained in:
parent
d76b7c80f4
commit
eb45bfc805
3 changed files with 34 additions and 8 deletions
|
@ -6049,11 +6049,20 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
||||||
|
|
||||||
View view = LayoutInflater.from(getContext()).inflate(R.layout.dialog_junk, null);
|
View view = LayoutInflater.from(getContext()).inflate(R.layout.dialog_junk, null);
|
||||||
final TextView tvMessage = view.findViewById(R.id.tvMessage);
|
final TextView tvMessage = view.findViewById(R.id.tvMessage);
|
||||||
|
final ImageButton ibInfo = view.findViewById(R.id.ibInfo);
|
||||||
final CheckBox cbBlockSender = view.findViewById(R.id.cbBlockSender);
|
final CheckBox cbBlockSender = view.findViewById(R.id.cbBlockSender);
|
||||||
final CheckBox cbBlockDomain = view.findViewById(R.id.cbBlockDomain);
|
final CheckBox cbBlockDomain = view.findViewById(R.id.cbBlockDomain);
|
||||||
final Button btnEditRules = view.findViewById(R.id.btnEditRules);
|
final Button btnEditRules = view.findViewById(R.id.btnEditRules);
|
||||||
|
|
||||||
tvMessage.setText(getString(R.string.title_ask_spam_who, from));
|
tvMessage.setText(getString(R.string.title_ask_spam_who, from));
|
||||||
|
|
||||||
|
ibInfo.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View view) {
|
||||||
|
Helper.viewFAQ(getContext(), 92);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
cbBlockSender.setEnabled(ActivityBilling.isPro(getContext()));
|
cbBlockSender.setEnabled(ActivityBilling.isPro(getContext()));
|
||||||
cbBlockDomain.setEnabled(false);
|
cbBlockDomain.setEnabled(false);
|
||||||
|
|
||||||
|
@ -6087,12 +6096,6 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.setNegativeButton(android.R.string.cancel, null)
|
.setNegativeButton(android.R.string.cancel, null)
|
||||||
.setNeutralButton(R.string.title_info, new DialogInterface.OnClickListener() {
|
|
||||||
@Override
|
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
|
||||||
Helper.viewFAQ(getContext(), 92);
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.create();
|
.create();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,6 +20,28 @@
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<eu.faircode.email.FixedTextView
|
||||||
|
android:id="@+id/tvJunkHint"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="12dp"
|
||||||
|
android:text="@string/title_junk_hint"
|
||||||
|
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||||
|
android:textStyle="italic"
|
||||||
|
app:layout_constraintEnd_toStartOf="@+id/ibInfo"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/tvMessage" />
|
||||||
|
|
||||||
|
<ImageButton
|
||||||
|
android:id="@+id/ibInfo"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:contentDescription="@string/title_info"
|
||||||
|
android:tooltipText="@string/title_info"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="@id/tvJunkHint"
|
||||||
|
app:srcCompat="@drawable/baseline_info_24" />
|
||||||
|
|
||||||
<CheckBox
|
<CheckBox
|
||||||
android:id="@+id/cbBlockSender"
|
android:id="@+id/cbBlockSender"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
@ -28,7 +50,7 @@
|
||||||
android:text="@string/title_block_sender"
|
android:text="@string/title_block_sender"
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/tvMessage" />
|
app:layout_constraintTop_toBottomOf="@id/tvJunkHint" />
|
||||||
|
|
||||||
<CheckBox
|
<CheckBox
|
||||||
android:id="@+id/cbBlockDomain"
|
android:id="@+id/cbBlockDomain"
|
||||||
|
@ -47,7 +69,7 @@
|
||||||
android:layout_marginTop="12dp"
|
android:layout_marginTop="12dp"
|
||||||
android:text="@string/title_block_sender_hint"
|
android:text="@string/title_block_sender_hint"
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||||
android:textColor="?android:attr/textColorPrimary"
|
android:textStyle="italic"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/cbBlockDomain" />
|
app:layout_constraintTop_toBottomOf="@+id/cbBlockDomain" />
|
||||||
|
|
||||||
|
|
|
@ -84,6 +84,7 @@
|
||||||
<item quantity="other">Treat %1$d messages as spam?</item>
|
<item quantity="other">Treat %1$d messages as spam?</item>
|
||||||
</plurals>
|
</plurals>
|
||||||
<string name="title_ask_spam_who">Treat message from %1$s as spam?</string>
|
<string name="title_ask_spam_who">Treat message from %1$s as spam?</string>
|
||||||
|
<string name="title_junk_hint">Your email provider is responsible for filtering spam. An email app does not have all data to do this reliably.</string>
|
||||||
|
|
||||||
<string name="title_block">Block %1$s</string>
|
<string name="title_block">Block %1$s</string>
|
||||||
<string name="title_block_sender">Block sender</string>
|
<string name="title_block_sender">Block sender</string>
|
||||||
|
|
Loading…
Reference in a new issue