Added reformatted hint

pull/184/head
M66B 4 years ago
parent c996b20223
commit 40af60bf95

@ -430,6 +430,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
private ImageButton ibInbox;
private ImageButton ibMore;
private ImageButton ibTools;
private TextView tvReformatted;
private TextView tvSignedData;
private TextView tvBody;
@ -638,6 +639,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
ibInbox = vsBody.findViewById(R.id.ibInbox);
ibMore = vsBody.findViewById(R.id.ibMore);
ibTools = vsBody.findViewById(R.id.ibTools);
tvReformatted = vsBody.findViewById(R.id.tvReformatted);
tvSignedData = vsBody.findViewById(R.id.tvSignedData);
tvBody = vsBody.findViewById(R.id.tvBody);
@ -1300,6 +1302,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
ibInbox.setVisibility(View.GONE);
ibMore.setVisibility(View.GONE);
ibTools.setVisibility(View.GONE);
tvReformatted.setVisibility(View.GONE);
tvSignedData.setVisibility(View.GONE);
tvNoInternetBody.setVisibility(View.GONE);
@ -1434,6 +1437,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
ibInbox.setVisibility(View.GONE);
ibMore.setVisibility(View.GONE);
ibTools.setVisibility(View.GONE);
tvReformatted.setVisibility(View.GONE);
tvSignedData.setVisibility(View.GONE);
// Message text
@ -2179,6 +2183,9 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
EntityMessage.SMIME_SIGNENCRYPT.equals(message.ui_encrypt))
? View.VISIBLE : View.GONE);
boolean reformatted_hint = prefs.getBoolean("reformatted_hint", true);
tvReformatted.setVisibility(reformatted_hint ? View.VISIBLE : View.GONE);
boolean signed_data = args.getBoolean("signed_data");
tvSignedData.setVisibility(signed_data ? View.VISIBLE : View.GONE);
@ -3494,6 +3501,11 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
}
private void onShow(final TupleMessageEx message, boolean full) {
if (full && tvReformatted.getVisibility() == View.VISIBLE) {
prefs.edit().putBoolean("reformatted_hint", false).apply();
tvReformatted.setVisibility(View.GONE);
}
boolean current = properties.getValue(full ? "full" : "images", message.id);
boolean asked = properties.getValue(full ? "full_asked" : "images_asked", message.id);
if (current || asked) {

@ -110,7 +110,7 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
private final static String[] RESET_QUESTIONS = new String[]{
"welcome", "first", "app_support", "notify_archive", "message_swipe", "message_select", "folder_actions", "folder_sync",
"crash_reports_asked", "review_asked", "review_later", "why",
"reply_hint", "html_always_images", "print_html_confirmed",
"reply_hint", "html_always_images", "print_html_confirmed", "reformatted_hint",
"selected_folders", "move_1_confirmed", "move_n_confirmed",
"last_search_senders", "last_search_recipients", "last_search_subject", "last_search_keywords", "last_search_message", "last_search",
"identities_asked", "cc_bcc", "inline_image_hint", "compose_reference", "send_dialog",

@ -271,6 +271,17 @@
app:layout_constraintTop_toBottomOf="@id/vSeparator"
app:srcCompat="@drawable/baseline_fullscreen_24" />
<eu.faircode.email.FixedTextView
android:id="@+id/tvReformatted"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="@string/title_reformatted"
android:textAppearance="@style/TextAppearance.AppCompat.Small"
android:textStyle="italic"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/ibFull" />
<eu.faircode.email.FixedTextView
android:id="@+id/tvSignedData"
android:layout_width="0dp"
@ -278,7 +289,8 @@
android:gravity="center"
android:text="@string/title_signed_data"
android:textAppearance="@style/TextAppearance.AppCompat.Small"
android:textStyle="italic"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/ibVerify" />
app:layout_constraintTop_toBottomOf="@id/tvReformatted" />
</androidx.constraintlayout.widget.ConstraintLayout>

@ -874,6 +874,7 @@
<string name="title_expand_warning">Expanding this message will download %1$s</string>
<string name="title_download_message">Downloading &#8230;</string>
<string name="title_reformatted">This is the reformatted message view. You can tap on the &#x26F6; icon to view the original message and to hide this message.</string>
<string name="title_compose">Compose</string>
<string name="title_submitter">Sent by:</string>

Loading…
Cancel
Save