updates and new patches by rod
[webos-internals:modifications.git] / email / email-delete-email-and-view-next---older-message.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..4d7905e 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 @@ -2142,10 +2142,18 @@ var MessageAssistant = Class.create({
6                 });
7         },
8  
9 -       deleteEmail: function() {
10 -               Message.setDeleted(this.data.id, true);
11 -               this.controller.stageController.popScene();
12 -       }
13 +       
14 +       deleteEmail: function() {                                  
15 +                Message.setDeleted(this.data.id, true);       
16 +                if(this.nextMessages["older"] !== undefined){       
17 +                        this.gotoNextEmail("older");       
18 +                }else if(this.nextMessages["newer"] !== undefined){
19 +                       this.gotoNextEmail("newer");
20 +                }else{
21 +                        this.controller.stageController.popScene();
22 +                }                 
23 +                                              
24 +        }    
25  });
26  
27  MessageAssistant.kAppMenuMarkRead = $L('Mark as Read');