Added message snooze menu

pull/165/head
M66B 5 years ago
parent eee5168c89
commit 80e201b883

@ -1463,14 +1463,14 @@ to justify making FairEmail available in the [Google Play Family Library](https:
**(67) How can I snooze conversations?** **(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 ...*. 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. 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. The conversations will be hidden for the selected time and shown again afterwards.
You will receive a new message notification as reminder. You will receive a new message notification as reminder.
It is also possible to snooze messages with [a rule](#user-content-faq71). 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. You can tap on the small snooze icon to see until when a conversation is snoozed.

@ -2996,6 +2996,9 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
case R.id.menu_unseen: case R.id.menu_unseen:
onMenuUnseen(message); onMenuUnseen(message);
return true; return true;
case R.id.menu_snooze:
onMenuSnooze(message);
return true;
case R.id.menu_hide: case R.id.menu_hide:
onMenuHide(message); onMenuHide(message);
return true; return true;
@ -3209,6 +3212,20 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
}.execute(context, owner, args, "message:unseen"); }.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) { private void onMenuHide(final TupleMessageEx message) {
Bundle args = new Bundle(); Bundle args = new Bundle();
args.putLong("id", message.id); args.putLong("id", message.id);

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

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

Loading…
Cancel
Save