mirror of
https://github.com/M66B/FairEmail.git
synced 2025-03-01 09:16:00 +00:00
Added outbox hint
This commit is contained in:
parent
7eda04bfb1
commit
fb579d0d07
4 changed files with 57 additions and 2 deletions
|
@ -256,6 +256,7 @@ public class FragmentMessages extends FragmentBase
|
||||||
private TextView tvSupport;
|
private TextView tvSupport;
|
||||||
private ImageButton ibHintSupport;
|
private ImageButton ibHintSupport;
|
||||||
private ImageButton ibHintSwipe;
|
private ImageButton ibHintSwipe;
|
||||||
|
private ImageButton ibHintOutbox;
|
||||||
private ImageButton ibHintSelect;
|
private ImageButton ibHintSelect;
|
||||||
private ImageButton ibHintJunk;
|
private ImageButton ibHintJunk;
|
||||||
private TextView tvMod;
|
private TextView tvMod;
|
||||||
|
@ -283,6 +284,7 @@ public class FragmentMessages extends FragmentBase
|
||||||
private Group grpSupport;
|
private Group grpSupport;
|
||||||
private Group grpHintSupport;
|
private Group grpHintSupport;
|
||||||
private Group grpHintSwipe;
|
private Group grpHintSwipe;
|
||||||
|
private Group grpHintOutbox;
|
||||||
private Group grpHintSelect;
|
private Group grpHintSelect;
|
||||||
private Group grpHintJunk;
|
private Group grpHintJunk;
|
||||||
private Group grpMotd;
|
private Group grpMotd;
|
||||||
|
@ -581,6 +583,7 @@ public class FragmentMessages extends FragmentBase
|
||||||
tvSupport = view.findViewById(R.id.tvSupport);
|
tvSupport = view.findViewById(R.id.tvSupport);
|
||||||
ibHintSupport = view.findViewById(R.id.ibHintSupport);
|
ibHintSupport = view.findViewById(R.id.ibHintSupport);
|
||||||
ibHintSwipe = view.findViewById(R.id.ibHintSwipe);
|
ibHintSwipe = view.findViewById(R.id.ibHintSwipe);
|
||||||
|
ibHintOutbox = view.findViewById(R.id.ibHintOutbox);
|
||||||
ibHintSelect = view.findViewById(R.id.ibHintSelect);
|
ibHintSelect = view.findViewById(R.id.ibHintSelect);
|
||||||
ibHintJunk = view.findViewById(R.id.ibHintJunk);
|
ibHintJunk = view.findViewById(R.id.ibHintJunk);
|
||||||
tvMod = view.findViewById(R.id.tvMotd);
|
tvMod = view.findViewById(R.id.tvMotd);
|
||||||
|
@ -609,6 +612,7 @@ public class FragmentMessages extends FragmentBase
|
||||||
grpSupport = view.findViewById(R.id.grpSupport);
|
grpSupport = view.findViewById(R.id.grpSupport);
|
||||||
grpHintSupport = view.findViewById(R.id.grpHintSupport);
|
grpHintSupport = view.findViewById(R.id.grpHintSupport);
|
||||||
grpHintSwipe = view.findViewById(R.id.grpHintSwipe);
|
grpHintSwipe = view.findViewById(R.id.grpHintSwipe);
|
||||||
|
grpHintOutbox = view.findViewById(R.id.grpHintOutbox);
|
||||||
grpHintSelect = view.findViewById(R.id.grpHintSelect);
|
grpHintSelect = view.findViewById(R.id.grpHintSelect);
|
||||||
grpHintJunk = view.findViewById(R.id.grpHintJunk);
|
grpHintJunk = view.findViewById(R.id.grpHintJunk);
|
||||||
grpMotd = view.findViewById(R.id.grpMotd);
|
grpMotd = view.findViewById(R.id.grpMotd);
|
||||||
|
@ -713,6 +717,14 @@ public class FragmentMessages extends FragmentBase
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
ibHintOutbox.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
prefs.edit().putBoolean("message_outbox", true).apply();
|
||||||
|
grpHintOutbox.setVisibility(View.GONE);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
ibHintSelect.setOnClickListener(new View.OnClickListener() {
|
ibHintSelect.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
|
@ -5285,11 +5297,13 @@ public class FragmentMessages extends FragmentBase
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean hints = (viewType == AdapterMessage.ViewType.UNIFIED || viewType == AdapterMessage.ViewType.FOLDER);
|
boolean hints = (viewType == AdapterMessage.ViewType.UNIFIED || viewType == AdapterMessage.ViewType.FOLDER);
|
||||||
|
boolean outbox = EntityFolder.OUTBOX.equals(type);
|
||||||
boolean junk = EntityFolder.JUNK.equals(type);
|
boolean junk = EntityFolder.JUNK.equals(type);
|
||||||
|
|
||||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getContext());
|
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getContext());
|
||||||
boolean app_support = prefs.getBoolean("app_support", false);
|
boolean app_support = prefs.getBoolean("app_support", false);
|
||||||
boolean message_swipe = prefs.getBoolean("message_swipe", false);
|
boolean message_swipe = prefs.getBoolean("message_swipe", false);
|
||||||
|
boolean message_outbox = prefs.getBoolean("message_outbox", false);
|
||||||
boolean message_select = prefs.getBoolean("message_select", false);
|
boolean message_select = prefs.getBoolean("message_select", false);
|
||||||
boolean message_junk = prefs.getBoolean("message_junk", false);
|
boolean message_junk = prefs.getBoolean("message_junk", false);
|
||||||
boolean motd = prefs.getBoolean("motd", false);
|
boolean motd = prefs.getBoolean("motd", false);
|
||||||
|
@ -5297,6 +5311,7 @@ public class FragmentMessages extends FragmentBase
|
||||||
|
|
||||||
grpHintSupport.setVisibility(app_support || !hints || junk ? View.GONE : View.VISIBLE);
|
grpHintSupport.setVisibility(app_support || !hints || junk ? View.GONE : View.VISIBLE);
|
||||||
grpHintSwipe.setVisibility(message_swipe || !hints || junk ? View.GONE : View.VISIBLE);
|
grpHintSwipe.setVisibility(message_swipe || !hints || junk ? View.GONE : View.VISIBLE);
|
||||||
|
grpHintOutbox.setVisibility(message_outbox || !hints || !outbox ? View.GONE : View.VISIBLE);
|
||||||
grpHintSelect.setVisibility(message_select || !hints || junk ? View.GONE : View.VISIBLE);
|
grpHintSelect.setVisibility(message_select || !hints || junk ? View.GONE : View.VISIBLE);
|
||||||
grpHintJunk.setVisibility(message_junk || !junk ? View.GONE : View.VISIBLE);
|
grpHintJunk.setVisibility(message_junk || !junk ? View.GONE : View.VISIBLE);
|
||||||
grpMotd.setVisibility(motd ? View.VISIBLE : View.GONE);
|
grpMotd.setVisibility(motd ? View.VISIBLE : View.GONE);
|
||||||
|
|
|
@ -307,7 +307,7 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
|
||||||
|
|
||||||
private final static String[] RESET_QUESTIONS = new String[]{
|
private final static String[] RESET_QUESTIONS = new String[]{
|
||||||
"first", "app_support", "notify_archive",
|
"first", "app_support", "notify_archive",
|
||||||
"message_swipe", "message_select", "message_junk",
|
"message_swipe", "message_outbox", "message_select", "message_junk",
|
||||||
"folder_actions", "folder_sync",
|
"folder_actions", "folder_sync",
|
||||||
"crash_reports_asked", "review_asked", "review_later", "why",
|
"crash_reports_asked", "review_asked", "review_later", "why",
|
||||||
"reply_hint", "html_always_images", "open_full_confirmed", "open_amp_confirmed",
|
"reply_hint", "html_always_images", "open_full_confirmed", "open_amp_confirmed",
|
||||||
|
|
|
@ -204,6 +204,39 @@
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/tvHintSwipe" />
|
app:layout_constraintTop_toBottomOf="@id/tvHintSwipe" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvHintOutbox"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:minHeight="36dp"
|
||||||
|
android:padding="6dp"
|
||||||
|
android:text="@string/title_hint_outbox"
|
||||||
|
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||||
|
app:layout_constraintEnd_toStartOf="@+id/ibHintSwipe"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/vSeparatorHintSwipe" />
|
||||||
|
|
||||||
|
<ImageButton
|
||||||
|
android:id="@+id/ibHintOutbox"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||||
|
android:contentDescription="@string/title_legend_close_hint"
|
||||||
|
android:padding="9dp"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@id/tvHintOutbox"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="@id/tvHintOutbox"
|
||||||
|
app:srcCompat="@drawable/twotone_close_24" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:id="@+id/vSeparatorHintOutbox"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:background="?attr/colorSeparator"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/tvHintOutbox" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tvHintSelect"
|
android:id="@+id/tvHintSelect"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
|
@ -215,7 +248,7 @@
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||||
app:layout_constraintEnd_toStartOf="@+id/ibHintSelect"
|
app:layout_constraintEnd_toStartOf="@+id/ibHintSelect"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/vSeparatorHintSwipe" />
|
app:layout_constraintTop_toBottomOf="@id/vSeparatorHintOutbox" />
|
||||||
|
|
||||||
<ImageButton
|
<ImageButton
|
||||||
android:id="@+id/ibHintSelect"
|
android:id="@+id/ibHintSelect"
|
||||||
|
@ -584,6 +617,12 @@
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
app:constraint_referenced_ids="tvHintSwipe,ibHintSwipe,vSeparatorHintSwipe" />
|
app:constraint_referenced_ids="tvHintSwipe,ibHintSwipe,vSeparatorHintSwipe" />
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.Group
|
||||||
|
android:id="@+id/grpHintOutbox"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
app:constraint_referenced_ids="tvHintOutbox,ibHintOutbox,vSeparatorHintOutbox" />
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.Group
|
<androidx.constraintlayout.widget.Group
|
||||||
android:id="@+id/grpHintSelect"
|
android:id="@+id/grpHintSelect"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
|
|
|
@ -2286,6 +2286,7 @@
|
||||||
<string name="title_hint_dismiss">You can dismiss this dialog box to remove the notice.</string>
|
<string name="title_hint_dismiss">You can dismiss this dialog box to remove the notice.</string>
|
||||||
<string name="title_hint_support">If you have a question or a problem, please use the support menu to get help</string>
|
<string name="title_hint_support">If you have a question or a problem, please use the support menu to get help</string>
|
||||||
<string name="title_hint_message_actions">Swipe left to trash; Swipe right to archive (if available); The swipe actions can be configured in the account settings</string>
|
<string name="title_hint_message_actions">Swipe left to trash; Swipe right to archive (if available); The swipe actions can be configured in the account settings</string>
|
||||||
|
<string name="title_hint_outbox">You can swipe left or right to cancel sending</string>
|
||||||
<string name="title_hint_message_selection">Long press a message to start selecting multiple messages; Hold and swipe up or down to select more messages</string>
|
<string name="title_hint_message_selection">Long press a message to start selecting multiple messages; Hold and swipe up or down to select more messages</string>
|
||||||
<string name="title_hint_message_junk">
|
<string name="title_hint_message_junk">
|
||||||
An email client basically displays messages on an email server.
|
An email client basically displays messages on an email server.
|
||||||
|
|
Loading…
Reference in a new issue