mirror of https://github.com/M66B/FairEmail.git
Added hint
This commit is contained in:
parent
ac5206f849
commit
592dc107ef
|
@ -385,6 +385,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|||
private ImageButton ibRemove;
|
||||
private ImageButton ibMore;
|
||||
private TextView tvSignedData;
|
||||
private TextView tvCrossHint;
|
||||
|
||||
private TextView tvBody;
|
||||
private View wvBody;
|
||||
|
@ -568,6 +569,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|||
ibRemove = vsBody.findViewById(R.id.ibRemove);
|
||||
ibMore = vsBody.findViewById(R.id.ibMore);
|
||||
tvSignedData = vsBody.findViewById(R.id.tvSignedData);
|
||||
tvCrossHint = vsBody.findViewById(R.id.tvCrossHint);
|
||||
|
||||
tvBody = vsBody.findViewById(R.id.tvBody);
|
||||
wvBody = vsBody.findViewById(R.id.wvBody);
|
||||
|
@ -1141,6 +1143,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|||
ibRemove.setVisibility(View.GONE);
|
||||
ibMore.setVisibility(View.GONE);
|
||||
tvSignedData.setVisibility(View.GONE);
|
||||
tvCrossHint.setVisibility(View.GONE);
|
||||
|
||||
tvBody.setVisibility(View.GONE);
|
||||
wvBody.setVisibility(View.GONE);
|
||||
|
@ -1283,6 +1286,9 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|||
tvNoInternetHeaders.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
|
||||
boolean cross_hint = prefs.getBoolean("cross_hint", true);
|
||||
|
||||
vSeparator.setVisibility(View.VISIBLE);
|
||||
ibFull.setEnabled(false);
|
||||
ibFull.setVisibility(View.VISIBLE);
|
||||
|
@ -1294,6 +1300,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|||
ibRemove.setVisibility(message.folderReadOnly ? View.GONE : View.VISIBLE);
|
||||
ibMore.setVisibility(EntityFolder.OUTBOX.equals(message.folderType) ? View.GONE : View.VISIBLE);
|
||||
tvSignedData.setVisibility(View.GONE);
|
||||
tvCrossHint.setVisibility(cross_hint ? View.VISIBLE : View.GONE);
|
||||
|
||||
// Addresses
|
||||
ibExpanderAddress.setImageLevel(show_addresses ? 0 /* less */ : 1 /* more */);
|
||||
|
@ -3006,6 +3013,10 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|||
}
|
||||
|
||||
private void onActionRemove(TupleMessageEx message) {
|
||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
|
||||
prefs.edit().putBoolean("cross_hint", false).apply();
|
||||
tvCrossHint.setVisibility(View.GONE);
|
||||
|
||||
// Setup actions
|
||||
Bundle sargs = new Bundle();
|
||||
sargs.putLong("id", message.id);
|
||||
|
|
|
@ -81,7 +81,7 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
|
|||
};
|
||||
|
||||
private final static String[] RESET_QUESTIONS = new String[]{
|
||||
"welcome", "crash_reports_asked", "review_asked", "review_later", "why",
|
||||
"welcome", "crash_reports_asked", "review_asked", "review_later", "cross_hint", "why",
|
||||
"reply_hint", "html_always_images", "print_html_confirmed", "move_1_confirmed", "move_n_confirmed",
|
||||
"identities_asked", "cc_bcc", "inline_image_hint", "compose_reference", "send_dialog",
|
||||
"setup_advanced"
|
||||
|
|
|
@ -150,5 +150,17 @@
|
|||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/ibVerify" />
|
||||
app:layout_constraintTop_toBottomOf="@id/ibFull" />
|
||||
|
||||
<eu.faircode.email.FixedTextView
|
||||
android:id="@+id/tvCrossHint"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="6dp"
|
||||
android:text="@string/title_message_bar_hint"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
android:textStyle="italic"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@id/ibRemove"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvSignedData" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
|
|
@ -734,6 +734,7 @@
|
|||
<string name="title_ask_help">Help improve FairEmail</string>
|
||||
<string name="title_ask_reporting">Send error reports?</string>
|
||||
<string name="title_reporting_why">Error reporting will help improve FairEmail</string>
|
||||
<string name="title_message_bar_hint">Tap the cross icon to archive, delete or report a message as spam and to remove this notice</string>
|
||||
|
||||
<string name="title_ask_review">Please review FairEmail</string>
|
||||
<string name="title_ask_review_rationale">
|
||||
|
|
Loading…
Reference in New Issue