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,19 +455,22 @@ 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
|
||||||
|
//
|
||||||
|
try {
|
||||||
|
MessageInfoHolder message = (MessageInfoHolder) mAdapter.getChild(group, item);
|
||||||
switch (keyCode) {
|
switch (keyCode) {
|
||||||
case KeyEvent.KEYCODE_DEL: {
|
case KeyEvent.KEYCODE_DEL: { onDelete(message); return true;}
|
||||||
if (true) {
|
case KeyEvent.KEYCODE_C: { onCompose(); return true;}
|
||||||
MessageInfoHolder message = (MessageInfoHolder) mAdapter.getChild(group, item);
|
case KeyEvent.KEYCODE_Q: { onAccounts(); return true; }
|
||||||
|
case KeyEvent.KEYCODE_F: { onForward(message); return true;}
|
||||||
onDelete(message);
|
case KeyEvent.KEYCODE_A: { onReplyAll(message); return true; }
|
||||||
}
|
case KeyEvent.KEYCODE_R: { onReply(message); return true; }
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
finally {
|
||||||
return super.onKeyDown(keyCode, event);
|
return super.onKeyDown(keyCode, event);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user