mirror of https://github.com/M66B/FairEmail.git
Warning for missing sent messages folder
This commit is contained in:
parent
72e0514b93
commit
d0fa4677a7
|
@ -123,6 +123,7 @@ public class FragmentAccount extends FragmentBase {
|
|||
private ArrayAdapter<EntityFolder> adapter;
|
||||
private Spinner spDrafts;
|
||||
private Spinner spSent;
|
||||
private TextView tvSentWarning;
|
||||
private Spinner spArchive;
|
||||
private Spinner spTrash;
|
||||
private Spinner spJunk;
|
||||
|
@ -228,6 +229,7 @@ public class FragmentAccount extends FragmentBase {
|
|||
|
||||
spDrafts = view.findViewById(R.id.spDrafts);
|
||||
spSent = view.findViewById(R.id.spSent);
|
||||
tvSentWarning = view.findViewById(R.id.tvSentWarning);
|
||||
spArchive = view.findViewById(R.id.spArchive);
|
||||
spTrash = view.findViewById(R.id.spTrash);
|
||||
spJunk = view.findViewById(R.id.spJunk);
|
||||
|
@ -482,6 +484,19 @@ public class FragmentAccount extends FragmentBase {
|
|||
spTrash.setAdapter(adapter);
|
||||
spJunk.setAdapter(adapter);
|
||||
|
||||
tvSentWarning.setVisibility(View.GONE);
|
||||
spSent.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
||||
@Override
|
||||
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
|
||||
tvSentWarning.setVisibility(position == 0 ? View.VISIBLE : View.GONE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNothingSelected(AdapterView<?> parent) {
|
||||
tvSentWarning.setVisibility(View.VISIBLE);
|
||||
}
|
||||
});
|
||||
|
||||
adapterSwipe = new ArrayAdapter<EntityFolder>(getContext(), R.layout.spinner_item1, android.R.id.text1, new ArrayList<EntityFolder>()) {
|
||||
@NonNull
|
||||
@Override
|
||||
|
|
|
@ -52,6 +52,7 @@ public class FragmentDialogAccount extends FragmentDialogBase {
|
|||
final TextView tvInbox = dview.findViewById(R.id.tvInbox);
|
||||
final TextView tvDrafts = dview.findViewById(R.id.tvDrafts);
|
||||
final TextView tvSent = dview.findViewById(R.id.tvSent);
|
||||
final TextView tvSentWarning = dview.findViewById(R.id.tvSentWarning);
|
||||
final TextView tvTrash = dview.findViewById(R.id.tvTrash);
|
||||
final TextView tvJunk = dview.findViewById(R.id.tvJunk);
|
||||
final TextView tvArchive = dview.findViewById(R.id.tvArchive);
|
||||
|
@ -76,6 +77,8 @@ public class FragmentDialogAccount extends FragmentDialogBase {
|
|||
tvLeft.setText(null);
|
||||
tvRight.setText(null);
|
||||
|
||||
tvSentWarning.setVisibility(View.GONE);
|
||||
|
||||
Bundle args = getArguments();
|
||||
final long account = args.getLong("account");
|
||||
|
||||
|
@ -132,6 +135,7 @@ public class FragmentDialogAccount extends FragmentDialogBase {
|
|||
types.contains(EntityFolder.DRAFTS) ? check : close, null, null, null);
|
||||
tvSent.setCompoundDrawablesRelative(
|
||||
types.contains(EntityFolder.SENT) ? check : close, null, null, null);
|
||||
tvSentWarning.setVisibility(types.contains(EntityFolder.SENT) ? View.GONE : View.VISIBLE);
|
||||
tvTrash.setCompoundDrawablesRelative(
|
||||
types.contains(EntityFolder.TRASH) ? check : close, null, null, null);
|
||||
tvJunk.setCompoundDrawablesRelative(
|
||||
|
|
|
@ -69,6 +69,18 @@
|
|||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tvDrafts" />
|
||||
|
||||
<eu.faircode.email.FixedTextView
|
||||
android:id="@+id/tvSentWarning"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="6dp"
|
||||
android:text="@string/title_setup_quick_no_sent"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
android:textColor="?attr/colorWarning"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvSent" />
|
||||
|
||||
<eu.faircode.email.FixedTextView
|
||||
android:id="@+id/tvTrash"
|
||||
android:layout_width="wrap_content"
|
||||
|
@ -80,7 +92,7 @@
|
|||
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tvSent" />
|
||||
app:layout_constraintTop_toBottomOf="@+id/tvSentWarning" />
|
||||
|
||||
<eu.faircode.email.FixedTextView
|
||||
android:id="@+id/tvJunk"
|
||||
|
|
|
@ -792,6 +792,18 @@
|
|||
app:layout_constraintStart_toEndOf="@id/barrier_folders"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvDraftsRemark" />
|
||||
|
||||
<eu.faircode.email.FixedTextView
|
||||
android:id="@+id/tvSentWarning"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="6dp"
|
||||
android:text="@string/title_setup_quick_no_sent"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
android:textColor="?attr/colorWarning"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/spSent" />
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/spArchive"
|
||||
android:layout_width="0dp"
|
||||
|
@ -800,7 +812,7 @@
|
|||
android:layout_marginTop="12dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/barrier_folders"
|
||||
app:layout_constraintTop_toBottomOf="@id/spSent" />
|
||||
app:layout_constraintTop_toBottomOf="@id/tvSentWarning" />
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/spTrash"
|
||||
|
@ -1024,7 +1036,7 @@
|
|||
android:layout_height="0dp"
|
||||
app:constraint_referenced_ids="
|
||||
tvDrafts,spDrafts,tvDraftsRemark,
|
||||
tvSent,spSent,
|
||||
tvSent,spSent,tvSentWarning,
|
||||
tvArchive,spArchive,
|
||||
tvTrash,spTrash,
|
||||
tvJunk,spJunk,
|
||||
|
|
|
@ -200,6 +200,7 @@
|
|||
<string name="title_setup_no_inbox">Inbox not found</string>
|
||||
<string name="title_setup_advanced_protection">When enrolled in the advanced protection program it is not possible to use a third party email app. This is a restriction imposed by Google.</string>
|
||||
<string name="title_setup_quick_success">An account has successfully been added</string>
|
||||
<string name="title_setup_quick_no_sent">Sent messages might not be stored!</string>
|
||||
<string name="title_setup_quick_configure">To edit the name, color, swipe actions, etc</string>
|
||||
<string name="title_setup_manage">Manage</string>
|
||||
<string name="title_setup_grant">Grant</string>
|
||||
|
|
Loading…
Reference in New Issue