Difference between revisions of "Patch Messaging New Cards For Each Conversation"

From WebOS Internals
Jump to navigation Jump to search
 
(10 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 +
{{template:patch}}
 +
Works with: 1.0.4, 1.1
 +
 
The message app can be a pain when you have multiple conversations going on. You have to swipe back and then pick someone else quite often. It gets annoying. This modification makes it so a new card is created whenever you click into a conversation.
 
The message app can be a pain when you have multiple conversations going on. You have to swipe back and then pick someone else quite often. It gets annoying. This modification makes it so a new card is created whenever you click into a conversation.
  
Line 25: Line 28:
 
Mojo.Controller.getAppController().createStageWithCallback(params, callback); //doesnt create ifit exists sooo
 
Mojo.Controller.getAppController().createStageWithCallback(params, callback); //doesnt create ifit exists sooo
 
   },
 
   },
 
 
  clearListBadgeForChatThreadId: function(chatThreadId) {
 
var badgeContainers = ["buddyBageContainer","historyBageContainer"];
 
var listItem;
 
for (var i = 0; i < badgeContainers.length; i++) {
 
listItem = this.controller.get(badgeContainers[i] + chatThreadId);
 
if (listItem && !listItem.hasClassName('hide-unread-count')) {
 
listItem.addClassName('hide-unread-count');
 
}
 
}
 
  },
 
 
</nowiki></pre>
 
</nowiki></pre>
  
 
Now in /usr/palm/applications/com.palm.app.messaging/app/controllers/chatview-assistant.js
 
Now in /usr/palm/applications/com.palm.app.messaging/app/controllers/chatview-assistant.js
Comment out lines 246 and 247.
+
Comment out lines 246 and 247 (WebOS 1.1: Lines '''289''' & '''290''').
 
This will make it so if you back gesture in a chat, then it doesn't bring you back to the conversation list or do anything else.
 
This will make it so if you back gesture in a chat, then it doesn't bring you back to the conversation list or do anything else.
 +
 +
Either reboot or refresh/kill LunaSysMgr.
  
 
== Concerns==
 
== Concerns==
Line 46: Line 40:
  
 
Unread message counter in listview doesn't always update when you view a conversation.
 
Unread message counter in listview doesn't always update when you view a conversation.
 +
 +
Make sure to comment out the correct lines on the last step (disable back gesture).  In 1.3, they are lines 324 and 325.  The block to look for is:
 +
 +
    } else if(event.type == Mojo.Event.back) {
 +
        event.stop();
 +
        this.popAndRevealListView();
 +
        return;
 +
    }
 +
 +
which should be changed to:
 +
 +
    } else if(event.type == Mojo.Event.back) {
 +
        //event.stop();
 +
        //this.popAndRevealListView();
 +
        return;
 +
    }
  
 
== Major Bugs==
 
== Major Bugs==
Line 55: Line 65:
  
 
* verified by tictac (after a few miscues)
 
* verified by tictac (after a few miscues)
 +
 +
 +
****I found an error. In trying to delete conversations. The main page with all the conversation acts like it is deleting the conversation, but when you reopen the page the conversation is there again. I dont know who to contact about this, so i am posting here. I had to uninstal this patch and delete the messages. then i reinstalled. I do like the convienence of the patch except for that one error. <br>
 +
-Dragon1220<br>
 +
**** after reinstallation the delete function seems to be working correctly now. <br>
 +
-Dragon1220

Latest revision as of 19:07, 29 June 2010


Works with: 1.0.4, 1.1

The message app can be a pain when you have multiple conversations going on. You have to swipe back and then pick someone else quite often. It gets annoying. This modification makes it so a new card is created whenever you click into a conversation.

Edit /usr/palm/applications/com.palm.app.messaging/app/controllers/listview-assistant.js We are going to replace the launchChatView function with the following...

launchChatView: function(chatThreadId) {
	//Need to jump to that stage if it exists
	var stageController = Mojo.Controller.appController.getStageController("messaging"+chatThreadId);
		if (stageController) {
			stageController.activate();
			return;
		}

	var params = {name: 'messaging' + chatThreadId,
			lightweight: Mojo.Controller.appInfo.lwStages
	};

	var callback = function(controller) {
		controller.pushScene('chatview',chatThreadId,{
					focusWindow: true
				});		
	};

	Mojo.Controller.getAppController().createStageWithCallback(params, callback); //doesnt create ifit exists sooo
  },

Now in /usr/palm/applications/com.palm.app.messaging/app/controllers/chatview-assistant.js Comment out lines 246 and 247 (WebOS 1.1: Lines 289 & 290). This will make it so if you back gesture in a chat, then it doesn't bring you back to the conversation list or do anything else.

Either reboot or refresh/kill LunaSysMgr.

Concerns

There's some delay in creating the new cards. I'm not sure why though.

Unread message counter in listview doesn't always update when you view a conversation.

Make sure to comment out the correct lines on the last step (disable back gesture). In 1.3, they are lines 324 and 325. The block to look for is:

   } else if(event.type == Mojo.Event.back) {
       event.stop();
       this.popAndRevealListView();
       return;
   }

which should be changed to:

   } else if(event.type == Mojo.Event.back) {
       //event.stop();
       //this.popAndRevealListView();
       return;
   }

Major Bugs

None yet

Enjoy! -Mike dg


  • verified by tictac (after a few miscues)


        • I found an error. In trying to delete conversations. The main page with all the conversation acts like it is deleting the conversation, but when you reopen the page the conversation is there again. I dont know who to contact about this, so i am posting here. I had to uninstal this patch and delete the messages. then i reinstalled. I do like the convienence of the patch except for that one error.

-Dragon1220

        • after reinstallation the delete function seems to be working correctly now.

-Dragon1220