Added junk hint

pull/183/head
M66B 5 years ago
parent d76b7c80f4
commit eb45bfc805

@ -6049,11 +6049,20 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
View view = LayoutInflater.from(getContext()).inflate(R.layout.dialog_junk, null);
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 cbBlockDomain = view.findViewById(R.id.cbBlockDomain);
final Button btnEditRules = view.findViewById(R.id.btnEditRules);
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()));
cbBlockDomain.setEnabled(false);
@ -6087,12 +6096,6 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
}
})
.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();
}
}

@ -20,6 +20,28 @@
app:layout_constraintStart_toStartOf="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
android:id="@+id/cbBlockSender"
android:layout_width="wrap_content"
@ -28,7 +50,7 @@
android:text="@string/title_block_sender"
android:textAppearance="@style/TextAppearance.AppCompat.Small"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvMessage" />
app:layout_constraintTop_toBottomOf="@id/tvJunkHint" />
<CheckBox
android:id="@+id/cbBlockDomain"
@ -47,7 +69,7 @@
android:layout_marginTop="12dp"
android:text="@string/title_block_sender_hint"
android:textAppearance="@style/TextAppearance.AppCompat.Small"
android:textColor="?android:attr/textColorPrimary"
android:textStyle="italic"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/cbBlockDomain" />

@ -84,6 +84,7 @@
<item quantity="other">Treat %1$d messages as spam?</item>
</plurals>
<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_sender">Block sender</string>

Loading…
Cancel
Save