mirror of
https://github.com/M66B/FairEmail.git
synced 2025-01-01 12:44:42 +00:00
Added long press to insert contact group
This commit is contained in:
parent
5a57d52604
commit
099ad0b510
2 changed files with 28 additions and 3 deletions
1
FAQ.md
1
FAQ.md
|
@ -1950,6 +1950,7 @@ but even Google's Chrome cannot handle this.
|
|||
* Did you know that you can long press the full screen icon to show the original message text only?
|
||||
* Did you know that you can long press the answer button to reply to the sender? (since version 1.1562)
|
||||
* Did you know that you can long press the message move button to move across accounts? (since version 1.1702)
|
||||
* Did you know that you can long press the add contact button in the message composer to insert a contact group? (since version 1.1721)
|
||||
|
||||
<br />
|
||||
|
||||
|
|
|
@ -521,6 +521,28 @@ public class FragmentCompose extends FragmentBase {
|
|||
ibCcAdd.setOnClickListener(onPick);
|
||||
ibBccAdd.setOnClickListener(onPick);
|
||||
|
||||
View.OnLongClickListener onGroup = new View.OnLongClickListener() {
|
||||
@Override
|
||||
public boolean onLongClick(View view) {
|
||||
int id = view.getId();
|
||||
if (id == R.id.ibToAdd) {
|
||||
onMenuContactGroup(etTo);
|
||||
return true;
|
||||
} else if (id == R.id.ibCcAdd) {
|
||||
onMenuContactGroup(etCc);
|
||||
return true;
|
||||
} else if (id == R.id.ibBccAdd) {
|
||||
onMenuContactGroup(etBcc);
|
||||
return true;
|
||||
} else
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
ibToAdd.setOnLongClickListener(onGroup);
|
||||
ibCcAdd.setOnLongClickListener(onGroup);
|
||||
ibBccAdd.setOnLongClickListener(onGroup);
|
||||
|
||||
tvPlainTextOnly.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
|
@ -1810,11 +1832,11 @@ public class FragmentCompose extends FragmentBase {
|
|||
}
|
||||
|
||||
private void onMenuContactGroup() {
|
||||
Bundle args = new Bundle();
|
||||
args.putLong("working", working);
|
||||
onMenuContactGroup(view.findFocus());
|
||||
}
|
||||
|
||||
private void onMenuContactGroup(View v) {
|
||||
int focussed = 0;
|
||||
View v = view.findFocus();
|
||||
if (v != null) {
|
||||
if (v.getId() == R.id.etCc)
|
||||
focussed = 1;
|
||||
|
@ -1822,6 +1844,8 @@ public class FragmentCompose extends FragmentBase {
|
|||
focussed = 2;
|
||||
}
|
||||
|
||||
Bundle args = new Bundle();
|
||||
args.putLong("working", working);
|
||||
args.putInt("focussed", focussed);
|
||||
|
||||
Helper.hideKeyboard(view);
|
||||
|
|
Loading…
Reference in a new issue