mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-27 03:32:16 -05:00
added more keybindings (Reply, reply All, Compose, Forward, Quit-to-index
This commit is contained in:
parent
049223d82a
commit
ca569d9988
@ -455,20 +455,23 @@ public class FolderMessageList extends ExpandableListActivity {
|
|||||||
public boolean onKeyDown(int keyCode, KeyEvent event) {
|
public boolean onKeyDown(int keyCode, KeyEvent event) {
|
||||||
int group = mListView.getPackedPositionGroup(mListView.getSelectedId());
|
int group = mListView.getPackedPositionGroup(mListView.getSelectedId());
|
||||||
int item =(mListView.getSelectedItemPosition() -1 );
|
int item =(mListView.getSelectedItemPosition() -1 );
|
||||||
if (item >= 0) { // Guard against hitting delete on group names
|
// Guard against hitting delete on group names
|
||||||
switch (keyCode) {
|
//
|
||||||
case KeyEvent.KEYCODE_DEL: {
|
try {
|
||||||
if (true) {
|
|
||||||
MessageInfoHolder message = (MessageInfoHolder) mAdapter.getChild(group, item);
|
MessageInfoHolder message = (MessageInfoHolder) mAdapter.getChild(group, item);
|
||||||
|
switch (keyCode) {
|
||||||
onDelete(message);
|
case KeyEvent.KEYCODE_DEL: { onDelete(message); return true;}
|
||||||
}
|
case KeyEvent.KEYCODE_C: { onCompose(); return true;}
|
||||||
return true;
|
case KeyEvent.KEYCODE_Q: { onAccounts(); return true; }
|
||||||
}
|
case KeyEvent.KEYCODE_F: { onForward(message); return true;}
|
||||||
|
case KeyEvent.KEYCODE_A: { onReplyAll(message); return true; }
|
||||||
|
case KeyEvent.KEYCODE_R: { onReply(message); return true; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
finally {
|
||||||
return super.onKeyDown(keyCode, event);
|
return super.onKeyDown(keyCode, event);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user