Commit 7ec51020820f80176eebabb675e5575e59304f2e
- Diff rendering mode:
- inline
- side by side
messaging/messaging-new-card-per-convo.patch
(61 / 0)
|   | |||
| 1 | Each messaging conversation opens in a new window. | ||
| 2 | Index: /usr/palm/applications/com.palm.app.messaging/app/controllers/chatview-assistant.js | ||
| 3 | =================================================================== | ||
| 4 | --- .orig/usr/palm/applications/com.palm.app.messaging/app/controllers/chatview-assistant.js | ||
| 5 | +++ /usr/palm/applications/com.palm.app.messaging/app/controllers/chatview-assistant.js | ||
| 6 | @@ -318,8 +318,8 @@ var ChatviewAssistant = Class.create({ | ||
| 7 | this.copyConversationToClipboard(); | ||
| 8 | } | ||
| 9 | } else if(event.type == Mojo.Event.back) { | ||
| 10 | - event.stop(); | ||
| 11 | - this.popAndRevealListView(); | ||
| 12 | + // event.stop(); | ||
| 13 | + // this.popAndRevealListView(); | ||
| 14 | return; | ||
| 15 | } | ||
| 16 | }, | ||
| 17 | Index: /usr/palm/applications/com.palm.app.messaging/app/controllers/listview-assistant.js | ||
| 18 | =================================================================== | ||
| 19 | --- .orig/usr/palm/applications/com.palm.app.messaging/app/controllers/listview-assistant.js | ||
| 20 | +++ /usr/palm/applications/com.palm.app.messaging/app/controllers/listview-assistant.js | ||
| 21 | @@ -1069,20 +1069,27 @@ var ListviewAssistant = Class.create(App | ||
| 22 | }, {popScenesTo: CONSTANTS.SCENE_ID_ACCOUNT_SUMMARY}); | ||
| 23 | }, | ||
| 24 | |||
| 25 | - launchChatView: function(chatThreadId) { | ||
| 26 | - this.controller.stageController.pushScene('chatview',chatThreadId,{clearListBadgeFn:this.clearListBadgeForChatThreadId.bind(this,chatThreadId)}); | ||
| 27 | - }, | ||
| 28 | - | ||
| 29 | - clearListBadgeForChatThreadId: function(chatThreadId) { | ||
| 30 | - var badgeContainers = ["buddyBageContainer","historyBageContainer"]; | ||
| 31 | - var listItem; | ||
| 32 | - for (var i = 0; i < badgeContainers.length; i++) { | ||
| 33 | - listItem = this.controller.get(badgeContainers[i] + chatThreadId); | ||
| 34 | - if (listItem && !listItem.hasClassName('hide-unread-count')) { | ||
| 35 | - listItem.addClassName('hide-unread-count'); | ||
| 36 | - } | ||
| 37 | - } | ||
| 38 | +launchChatView: function(chatThreadId) { | ||
| 39 | + //Need to jump to that stage if it exists | ||
| 40 | + var stageController = Mojo.Controller.appController.getStageController("messaging"+chatThreadId); | ||
| 41 | + if (stageController) { | ||
| 42 | + stageController.activate(); | ||
| 43 | + return; | ||
| 44 | + } | ||
| 45 | + | ||
| 46 | + var params = {name: 'messaging' + chatThreadId, | ||
| 47 | + lightweight: Mojo.Controller.appInfo.lwStages | ||
| 48 | + }; | ||
| 49 | + | ||
| 50 | + var callback = function(controller) { | ||
| 51 | + controller.pushScene('chatview',chatThreadId,{ | ||
| 52 | + focusWindow: true | ||
| 53 | + }); | ||
| 54 | + }; | ||
| 55 | + | ||
| 56 | + Mojo.Controller.getAppController().createStageWithCallback(params, callback); //doesnt create ifit exists sooo | ||
| 57 | }, | ||
| 58 | + | ||
| 59 | |||
| 60 | loadDebugView: function() { | ||
| 61 | this.controller.stageController.pushScene('debug'); |
Comments
Add a new comment:
Login or create an account to post a comment
Add your comment
Please log in to comment

