mirror of https://github.com/M66B/FairEmail.git
Tap/long to reply/all
This commit is contained in:
parent
ca1056edbc
commit
a06500acec
|
@ -699,13 +699,14 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
|
|||
fabReply.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
if (values.containsKey("expanded") && values.get("expanded").size() > 0) {
|
||||
long id = values.get("expanded").get(0);
|
||||
Intent reply = new Intent(getContext(), ActivityCompose.class)
|
||||
.putExtra("action", "reply_all")
|
||||
.putExtra("reference", id);
|
||||
startActivity(reply);
|
||||
}
|
||||
onReply("reply");
|
||||
}
|
||||
});
|
||||
|
||||
fabReply.setOnLongClickListener(new View.OnLongClickListener() {
|
||||
@Override
|
||||
public boolean onLongClick(View view) {
|
||||
return onReply("reply_all");
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -1574,6 +1575,18 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
|
|||
}
|
||||
};
|
||||
|
||||
private boolean onReply(String action) {
|
||||
if (values.containsKey("expanded") && values.get("expanded").size() > 0) {
|
||||
long id = values.get("expanded").get(0);
|
||||
Intent reply = new Intent(getContext(), ActivityCompose.class)
|
||||
.putExtra("action", action)
|
||||
.putExtra("reference", id);
|
||||
startActivity(reply);
|
||||
return true;
|
||||
} else
|
||||
return false;
|
||||
}
|
||||
|
||||
private void onMore() {
|
||||
Bundle args = new Bundle();
|
||||
args.putLongArray("ids", getSelection());
|
||||
|
|
|
@ -186,7 +186,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="end|bottom"
|
||||
android:layout_margin="@dimen/fab_padding"
|
||||
android:src="@drawable/baseline_reply_all_24"
|
||||
android:src="@drawable/baseline_reply_24"
|
||||
android:tint="@color/colorActionForeground"
|
||||
app:layout_constraintBottom_toTopOf="@+id/seekBar"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
|
|
Loading…
Reference in New Issue