Added message snooze menu

This commit is contained in:
M66B 2019-11-06 10:23:41 +01:00
parent eee5168c89
commit 80e201b883
4 changed files with 24 additions and 3 deletions

4
FAQ.md
View File

@ -1463,14 +1463,14 @@ to justify making FairEmail available in the [Google Play Family Library](https:
**(67) How can I snooze conversations?**
Multiple select one of more conversations (long press to start multiple selecting), tap the three dot button and select *Snooze ...*.
Alternatively, use the *Snooze ...* 'more' menu in the expanded message view.
Alternatively, in the expanded message view use *Snooze ...* in the message three-dots 'more' menu or the timelapse action in the bottom action bar.
Select the time the conversation(s) should snooze and confirm by tapping OK.
The conversations will be hidden for the selected time and shown again afterwards.
You will receive a new message notification as reminder.
It is also possible to snooze messages with [a rule](#user-content-faq71).
You can show snoozed messages by using the *Snoozed* item in the three dot overflow menu.
You can show snoozed messages by unchecking *Filter out* > *Hidden* in the three dot overflow menu.
You can tap on the small snooze icon to see until when a conversation is snoozed.

View File

@ -2996,6 +2996,9 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
case R.id.menu_unseen:
onMenuUnseen(message);
return true;
case R.id.menu_snooze:
onMenuSnooze(message);
return true;
case R.id.menu_hide:
onMenuHide(message);
return true;
@ -3209,6 +3212,20 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
}.execute(context, owner, args, "message:unseen");
}
private void onMenuSnooze(final TupleMessageEx message) {
Bundle args = new Bundle();
args.putString("title", context.getString(R.string.title_snooze));
args.putLong("account", message.account);
args.putString("thread", message.thread);
args.putLong("id", message.id);
args.putBoolean("finish", true);
FragmentDialogDuration fragment = new FragmentDialogDuration();
fragment.setArguments(args);
fragment.setTargetFragment(parentFragment, FragmentMessages.REQUEST_MESSAGE_SNOOZE);
fragment.show(parentFragment.getParentFragmentManager(), "message:snooze");
}
private void onMenuHide(final TupleMessageEx message) {
Bundle args = new Bundle();
args.putLong("id", message.id);

View File

@ -251,7 +251,7 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
private static final int REQUEST_ASKED_MOVE_ACROSS = 10;
static final int REQUEST_MESSAGE_COLOR = 11;
private static final int REQUEST_MESSAGES_COLOR = 12;
private static final int REQUEST_MESSAGE_SNOOZE = 13;
static final int REQUEST_MESSAGE_SNOOZE = 13;
private static final int REQUEST_MESSAGES_SNOOZE = 14;
static final int REQUEST_MESSAGE_MOVE = 15;
private static final int REQUEST_MESSAGES_MOVE = 16;

View File

@ -8,6 +8,10 @@
android:id="@+id/menu_unseen"
android:title="@string/title_unseen" />
<item
android:id="@+id/menu_snooze"
android:title="@string/title_snooze" />
<item
android:id="@+id/menu_hide"
android:title="@string/title_hide" />