pushing patches through
[webos-internals:jeffrotulls-modifications.git] / email / email-swipe-for-prev-and-next-emails.patch
1 diff --git a/usr/palm/applications/com.palm.app.email/app/controllers/message-assistant.js b/usr/palm/applications/com.palm.app.email/app/controllers/message-assistant.js
2 index 761069e..8a891bf 100644
3 --- a/usr/palm/applications/com.palm.app.email/app/controllers/message-assistant.js
4 +++ b/usr/palm/applications/com.palm.app.email/app/controllers/message-assistant.js
5 @@ -143,6 +143,7 @@ var MessageAssistant = Class.create({
6                 Mojo.Event.listen(this.controller.stageController.document, Mojo.Event.activate, this.boundUpdateRecipientStatus);
7  
8                 Mojo.Event.listen(this.controller.getSceneScroller(), Mojo.Event.scrollStarting, this.addAsScrollListener.bind(this));
9 +               Mojo.Event.listen(this.controller.document, Mojo.Event.flick, this.flickHandler.bind(this));
10                 
11                 this.subjectElement = this.controller.get('email_subject');
12                 this.readViewContainer = this.controller.get('email-readview-content-container');
13 @@ -1855,6 +1856,15 @@ var MessageAssistant = Class.create({
14                 }
15         },
16  
17 +       flickHandler: function(event) {
18 +           if (event.velocity.x > 0) {
19 +               this.boundGotoNextEmailNewer();
20 +        }
21 +        else {
22 +            this.boundGotoNextEmailOlder();
23 +        }
24 +       },
25 +
26         gotoNextEmail: function(direction) {
27                 if (this.nextMessages !== undefined && this.nextMessages[direction] !== undefined) {
28                         var details = this.nextMessages[direction];