diff --git a/app/src/main/java/eu/faircode/email/FragmentOptionsBehavior.java b/app/src/main/java/eu/faircode/email/FragmentOptionsBehavior.java index 338f08b1c4..462877ab41 100644 --- a/app/src/main/java/eu/faircode/email/FragmentOptionsBehavior.java +++ b/app/src/main/java/eu/faircode/email/FragmentOptionsBehavior.java @@ -22,6 +22,7 @@ package eu.faircode.email; import android.app.Dialog; import android.content.Context; import android.content.DialogInterface; +import android.content.Intent; import android.content.SharedPreferences; import android.os.Build; import android.os.Bundle; @@ -40,6 +41,7 @@ import android.widget.Button; import android.widget.CompoundButton; import android.widget.EditText; import android.widget.Spinner; +import android.widget.TextView; import android.widget.Toast; import androidx.annotation.NonNull; @@ -47,6 +49,7 @@ import androidx.annotation.Nullable; import androidx.appcompat.app.AlertDialog; import androidx.appcompat.widget.SwitchCompat; import androidx.lifecycle.Lifecycle; +import androidx.localbroadcastmanager.content.LocalBroadcastManager; import androidx.preference.PreferenceManager; import java.util.ArrayList; @@ -74,6 +77,7 @@ public class FragmentOptionsBehavior extends FragmentBase implements SharedPrefe private SwitchCompat swExpandAll; private SwitchCompat swExpandOne; private SwitchCompat swAutoClose; + private TextView tvAutoSeenHint; private Spinner spOnClose; private Spinner spUndoTimeout; private SwitchCompat swCollapseMultiple; @@ -124,6 +128,7 @@ public class FragmentOptionsBehavior extends FragmentBase implements SharedPrefe swExpandAll = view.findViewById(R.id.swExpandAll); swExpandOne = view.findViewById(R.id.swExpandOne); swCollapseMultiple = view.findViewById(R.id.swCollapseMultiple); + tvAutoSeenHint = view.findViewById(R.id.tvAutoSeenHint); swAutoClose = view.findViewById(R.id.swAutoClose); spOnClose = view.findViewById(R.id.spOnClose); spUndoTimeout = view.findViewById(R.id.spUndoTimeout); @@ -310,6 +315,14 @@ public class FragmentOptionsBehavior extends FragmentBase implements SharedPrefe } }); + tvAutoSeenHint.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + LocalBroadcastManager lbm = LocalBroadcastManager.getInstance(v.getContext()); + lbm.sendBroadcast(new Intent(ActivitySetup.ACTION_VIEW_ACCOUNTS)); + } + }); + swAutoClose.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { @Override public void onCheckedChanged(CompoundButton compoundButton, boolean checked) { diff --git a/app/src/main/res/layout/fragment_options_behavior.xml b/app/src/main/res/layout/fragment_options_behavior.xml index f5e90bc9e6..fa64879c3d 100644 --- a/app/src/main/res/layout/fragment_options_behavior.xml +++ b/app/src/main/res/layout/fragment_options_behavior.xml @@ -356,29 +356,31 @@ app:layout_constraintTop_toBottomOf="@id/swExpandAll" app:switchPadding="12dp" /> - + app:layout_constraintTop_toBottomOf="@id/swExpandOne" + app:switchPadding="12dp" /> - + app:layout_constraintTop_toBottomOf="@id/swCollapseMultiple" /> Language detection support depends on the device manufacturer Automatically open message when there is just one message or just one unread message in a conversation - Automatically marking messages read on expanding can be disabled in the individual account settings + Automatically marking messages as read on expanding can be disabled in the advanced account settings of each account Automatically close conversations when all messages are archived, sent or trashed Most providers do not allow modified sender addresses The address won\'t be shown, but will be added on sending