16 Updated patches.
[webos-internals:shivaramv-modifications.git] / messaging / messaging-total-message-count.patch
1 diff --git a/usr/palm/applications/com.palm.app.messaging/app/controllers/chatview-assistant.js b/usr/palm/applications/com.palm.app.messaging/app/controllers/chatview-assistant.js
2 index 484cd45..89d1a48 100644
3 --- a/usr/palm/applications/com.palm.app.messaging/app/controllers/chatview-assistant.js
4 +++ b/usr/palm/applications/com.palm.app.messaging/app/controllers/chatview-assistant.js
5 @@ -1140,6 +1140,7 @@ var ChatviewAssistant = Class.create({
6                 } else if (update.descriptions && update.descriptions.msgDeleted) {
7                         // do nothing.  The list will remove the item so we can just ignore this event
8                         // We already reset the list when we sent the delete request to the service
9 +                       this.updateMsgCount();
10                 } else {
11                         // update the count and reload the window
12                         var currentListSize = listWidget.mojo.getLength();
13 @@ -1290,7 +1291,7 @@ var ChatviewAssistant = Class.create({
14                                 }
15                         }).defer();
16                 }
17 -               
18 +               this.updateMsgCount();
19                 this.debouncedListLoaded();
20                 //Mojo.Timing.pause("ChatviewAssistant#itemRendered");
21         },
22 @@ -1767,6 +1768,7 @@ var ChatviewAssistant = Class.create({
23                         
24                                         this.listReset = true;
25                                         MessagingMojoService.deleteMessage(this.controller, messageId);
26 +                                       this.updateMsgCount();
27                                 }
28                         },
29                         title: $L("Delete Message"),
30 @@ -1866,6 +1868,11 @@ var ChatviewAssistant = Class.create({
31                 }
32         },
33         
34 +       updateMsgCount: function() {
35 +               var newCount = this.chatListWidget.mojo.getLength();
36 +               this.chatViewRecipientName.update("(" + newCount + ")" + " " + this.chatDisplayName.escapeHTML());
37 +       },
38 +       
39         /**
40          * handler for message tap within chat list
41          *