<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://wiki.webos-internals.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Jspin72</id>
	<title>WebOS Internals - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.webos-internals.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Jspin72"/>
	<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/wiki/Special:Contributions/Jspin72"/>
	<updated>2026-04-20T07:14:54Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.35.1</generator>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Talk:Patch_Messaging_Change_%22Enter_Key%22_To_Create_Newline&amp;diff=3569</id>
		<title>Talk:Patch Messaging Change &quot;Enter Key&quot; To Create Newline</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Talk:Patch_Messaging_Change_%22Enter_Key%22_To_Create_Newline&amp;diff=3569"/>
		<updated>2009-08-03T06:36:11Z</updated>

		<summary type="html">&lt;p&gt;Jspin72: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;this is a useful mod, thx for sharing!&lt;br /&gt;
&lt;br /&gt;
as for displaying the newlines and spaces in the message body, the issue is that pretty much everything is a web page.  therefore you have to wrap the message text in &amp;lt;nowiki&amp;gt;&amp;lt;pre&amp;gt;&amp;lt;/nowiki&amp;gt; tags to preserve the format.  see [[Patch_Messaging_Adding_Timestamps_to_All_Received_Messages#Add_Timestamps_to_All_Messages_-_another_approach|this link]] for a solution to the problem.&lt;/div&gt;</summary>
		<author><name>Jspin72</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Patch_Messaging_Change_%22Enter_Key%22_To_Create_Newline&amp;diff=2807</id>
		<title>Patch Messaging Change &quot;Enter Key&quot; To Create Newline</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Patch_Messaging_Change_%22Enter_Key%22_To_Create_Newline&amp;diff=2807"/>
		<updated>2009-07-28T22:45:36Z</updated>

		<summary type="html">&lt;p&gt;Jspin72: /* Issues */ add a ref to the discussion&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Description=&lt;br /&gt;
I know a lot of people really like sending messages that are coherent, and a great way to do that is with the newline character. However, pressing the ENTER key in the messaging app sends a message, rather than typing a newline character. This page will show you how to (easily) change that action.&lt;br /&gt;
&lt;br /&gt;
= Prerequisites=&lt;br /&gt;
* Rooted phone.&lt;br /&gt;
&lt;br /&gt;
= Process=&lt;br /&gt;
# Log in as root.&lt;br /&gt;
# Mount the file system as RW.&lt;br /&gt;
# Enter the '''/usr/palm/applications/com.palm.app.messaging/app/controllers''' directory.&lt;br /&gt;
# Change '''compose-assistant.js''' (line 87) and '''chatview-assistant.js''' (line 100) and set '''enterSubmits''' to be '''false'''.&lt;br /&gt;
# Comment out the '''handleTextAreaKeyUp''' function in '''compose-assistant.js''' (lines 278 to 283) and '''chatview-assistant.js''' (lines 1678 to 1683).&lt;br /&gt;
# Mount the file system as RO.&lt;br /&gt;
# Reboot.&lt;br /&gt;
&lt;br /&gt;
* I'll post up more in depth instructions later, including how to make SHIFT+ENTER type a newline, and ENTER alone send the message.&lt;br /&gt;
&lt;br /&gt;
= Post-Mod Screenshots=&lt;br /&gt;
[[Image:Messaging-newline1.jpg]]&lt;br /&gt;
[[Image:Messaging-newline2.jpg]]&lt;br /&gt;
&lt;br /&gt;
= Issues=&lt;br /&gt;
* I haven't put enough time into this yet to figure out how to get the chat history to actually //show// the newlines. I think somewhere it just converts them to spaces. I'll research this more and let you know. (I have actually confirmed from another phone that it does send out the newline characters). (see the ''discussion'' tab above for the solution)&lt;br /&gt;
* When moving down a line, you can't get the first character to be lower-case.&lt;br /&gt;
&lt;br /&gt;
= Further Development=&lt;br /&gt;
* I'm sure this is quite simple, but as I said before, I haven't put too much time into this yet... It would be really nice if we could use a SHIFT+ENTER to type a newline, and only pressing ENTER would send the message as it does now. That way, everybody wins.&lt;br /&gt;
&lt;br /&gt;
== Author(s)==&lt;br /&gt;
* xluryan&lt;/div&gt;</summary>
		<author><name>Jspin72</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Talk:Patch_Messaging_Change_%22Enter_Key%22_To_Create_Newline&amp;diff=2806</id>
		<title>Talk:Patch Messaging Change &quot;Enter Key&quot; To Create Newline</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Talk:Patch_Messaging_Change_%22Enter_Key%22_To_Create_Newline&amp;diff=2806"/>
		<updated>2009-07-28T22:42:28Z</updated>

		<summary type="html">&lt;p&gt;Jspin72: New page: this is a useful mod, thx for sharing!  as for displaying the newlines and spaces in the message body, the issue is that pretty much everything is a web page.  therefore you have to wrap t...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;this is a useful mod, thx for sharing!&lt;br /&gt;
&lt;br /&gt;
as for displaying the newlines and spaces in the message body, the issue is that pretty much everything is a web page.  therefore you have to wrap the message text in &amp;lt;nowiki&amp;gt;&amp;lt;pre&amp;gt;&amp;lt;/nowiki&amp;gt; tags to preserve the format.  see [[Messaging_Mods#Add_Timestamps_to_All_Messages_-_another_approach|this link]] for a solution to the problem.&lt;/div&gt;</summary>
		<author><name>Jspin72</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Messaging_Mods&amp;diff=2791</id>
		<title>Messaging Mods</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Messaging_Mods&amp;diff=2791"/>
		<updated>2009-07-28T19:10:43Z</updated>

		<summary type="html">&lt;p&gt;Jspin72: /* Procedure */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;All files are located in '''/usr/palm/applications/com.palm.app.messaging/'''&lt;br /&gt;
&lt;br /&gt;
= Add Timestamps to All Messages =&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
A number of users have requested adding timestamps to each message that arrives on the device.&lt;br /&gt;
Palm actually goes out of their way to group messages that have arrived during various time intervals,&lt;br /&gt;
but if you'd prefer to see a timestamp on each message, simply follow the instructions below.&lt;br /&gt;
&lt;br /&gt;
== Procedure ==&lt;br /&gt;
&lt;br /&gt;
# [[Portal:Accessing_Linux|Gain root access to your device]]&lt;br /&gt;
# Remount the file system as read/write&lt;br /&gt;
# cd to '''/usr/palm/applications/com.palm.app.messaging/app/controllers/'''&lt;br /&gt;
# Backup '''chatview-assistant.js''' (just to be safe)&lt;br /&gt;
# Open '''chatview-assistant.js''' and comment out the following lines:&lt;br /&gt;
#* 1169 (webOS 1.1: '''1242''') - line that starts with: '''if(!ChatFlags.'''&lt;br /&gt;
#* 1177 (webOS 1.1: '''1250''') - line that starts with: '''if(today-msg.'''&lt;br /&gt;
#* 1179 (webOS 1.1: '''1252''') - first closing bracket on its own line: '''}'''&lt;br /&gt;
#* 1180 (webOS 1.1: '''1253''') - second closing bracket on its own line: '''}'''&lt;br /&gt;
# Save the file and exit the editor&lt;br /&gt;
# Remount the file system as read-only&lt;br /&gt;
# Logout of your root session&lt;br /&gt;
# Reboot the device&lt;br /&gt;
&lt;br /&gt;
You should now see a full timestamp on all received messages.&lt;br /&gt;
&lt;br /&gt;
== Acknowledgements ==&lt;br /&gt;
&lt;br /&gt;
Thanks to [[User:tk102|tk102]] and [[User:scuba_steve|scuba_steve]] on [http://www.precentral.net/  PreCentral] for the mod.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
= Add Timestamps to All Messages - another approach =&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The method described above is the easiest way to display message timestamps.  I went a little farther since I didn't want the &amp;quot;Message Sent:&amp;quot; label and I also wanted to format the string a bit more.  While I was at it, I also modified the view for the message text to display as pre-formatted text since text messages are text after all, not html.&lt;br /&gt;
&lt;br /&gt;
== Procedure ==&lt;br /&gt;
&lt;br /&gt;
* same as steps 1 &amp;amp; 2 above&lt;br /&gt;
* save a backup of /usr/palm/applications/com.palm.app.messaging/&lt;br /&gt;
** stylesheets/messaging.css&lt;br /&gt;
** app/views/chatview/message/message-text.html&lt;br /&gt;
** app/controllers/chatview-assistant.js&lt;br /&gt;
* edit stylesheets/messaging.css&lt;br /&gt;
** search for the string 'messageText' and append the following after its style definition&lt;br /&gt;
&lt;br /&gt;
 .messageText pre {&lt;br /&gt;
    font-family: inherit;&lt;br /&gt;
    font-size: inherit;&lt;br /&gt;
    color: inherit;&lt;br /&gt;
 }&lt;br /&gt;
 .timeStamp {&lt;br /&gt;
    font-size: 12px;&lt;br /&gt;
    font-style: italic;&lt;br /&gt;
    color: #1111ff;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
**feel free to change the style to your liking.  I tried using 'white-space: pre-wrap' in the .messageText class but it didn't behave as expected, hence the use of the pre tag.&lt;br /&gt;
* edit app/views/chatview/message/message-text.html&lt;br /&gt;
** change the single line to:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&amp;lt;div class=&amp;quot;messageText&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;#{-messageText}&amp;lt;/pre&amp;gt; #{-errorContent}&amp;lt;span class=&amp;quot;timeStamp&amp;quot;&amp;gt;#{-timeStampText}&amp;lt;/span&amp;lt;/div&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* edit app/controllers/chatview-assistant.js&lt;br /&gt;
** search for the string 'preFormatChatList:' and just below that look for 'var msg = stuff.list[i];'&lt;br /&gt;
** somewhere after that line (within the for loop) add the following:&lt;br /&gt;
 var ts = new Date();&lt;br /&gt;
 ts.setTime(msg.deviceTimeStamp);&lt;br /&gt;
 msg.timeStampText = Mojo.Format.formatDate(ts,'short');&lt;br /&gt;
** note that I used msg.deviceTimeStamp which I believe is when your phone sent/received the message.  If you'd prefer the time it was actually sent by the sender, use msg.timeStamp instead.  while you're in here, you may consider applying the [[Change_Enter_To_Create_Newline_Instead_of_Send_Message|send on return behavior]] changes.&lt;br /&gt;
* restart LunaSysMgr or reboot&lt;br /&gt;
&lt;br /&gt;
be sure to save the files you modified as they could get overwritten on the next sprint update.  better yet, install [[Applying_Patches|quilt]] to manage the diffs as a patch.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
= New Card For Each Conversation =&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The message app can be a pain when you have multiple conversations going on. You often have to swipe back and then pick someone else. &lt;br /&gt;
It gets annoying fast. This modification modifies the messaging application so that a new card is created whenever you click into a conversation.&lt;br /&gt;
&lt;br /&gt;
== Procedure ==&lt;br /&gt;
&lt;br /&gt;
Edit '''/usr/palm/applications/com.palm.app.messaging/app/controllers/listview-assistant.js''' and replace the launchChatView function with the following function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
launchChatView: function(chatThreadId) {&lt;br /&gt;
    //Need to jump to that stage if it exists&lt;br /&gt;
    var stageController = Mojo.Controller.appController.getStageController(&amp;quot;messaging&amp;quot;+chatThreadId);&lt;br /&gt;
        if (stageController) {&lt;br /&gt;
            stageController.activate();&lt;br /&gt;
            return;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
    var params = {name: 'messaging' + chatThreadId,&lt;br /&gt;
            lightweight: Mojo.Controller.appInfo.lwStages&lt;br /&gt;
    };&lt;br /&gt;
&lt;br /&gt;
    var callback = function(controller) {&lt;br /&gt;
        controller.pushScene('chatview',chatThreadId,{&lt;br /&gt;
                    focusWindow: true&lt;br /&gt;
                });        &lt;br /&gt;
    };&lt;br /&gt;
&lt;br /&gt;
    Mojo.Controller.getAppController().createStageWithCallback(params, callback); //doesnt create ifit exists sooo&lt;br /&gt;
  },&lt;br /&gt;
&lt;br /&gt;
  clearListBadgeForChatThreadId: function(chatThreadId) {&lt;br /&gt;
    var badgeContainers = [&amp;quot;buddyBageContainer&amp;quot;,&amp;quot;historyBageContainer&amp;quot;];&lt;br /&gt;
    var listItem;&lt;br /&gt;
    for (var i = 0; i &amp;lt; badgeContainers.length; i++) {&lt;br /&gt;
        listItem = this.controller.get(badgeContainers[i] + chatThreadId);&lt;br /&gt;
        if (listItem &amp;amp;&amp;amp; !listItem.hasClassName('hide-unread-count')) {&lt;br /&gt;
            listItem.addClassName('hide-unread-count');&lt;br /&gt;
        }&lt;br /&gt;
    }    &lt;br /&gt;
  },&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now in '''/usr/palm/applications/com.palm.app.messaging/app/controllers/chatview-assistant.js''', comment out lines 246 and 247 (webOS 1.1: comment out lines '''289''' and '''290''').&lt;br /&gt;
This change will ensure that if you use the &amp;quot;back gesture&amp;quot; in a chat, the application doesn't bring you back to the conversation list...or do anything else.&lt;br /&gt;
&lt;br /&gt;
To &amp;quot;comment out&amp;quot; a line, add // at the beginning. Example:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
printf(&amp;quot;This is code&amp;quot;);&lt;br /&gt;
//printf(&amp;quot;This is commented out&amp;quot;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Concerns ==&lt;br /&gt;
There is some delay in creating the new cards. I'm not sure why though.&lt;br /&gt;
As stated above, the cards are only opened when you click into the conversation.  Responding to a notification will result in the reuse of the buddy list window, and you have disabled the back gesture.&lt;br /&gt;
&lt;br /&gt;
== Acknolwedgements ==&lt;br /&gt;
&lt;br /&gt;
Thanks to [[User:mikedg|mikedg]] for the mod.&lt;br /&gt;
&lt;br /&gt;
[[User:chris_phelps|chris_phelps]] is continuing to work on this modification to get it working more completely.&lt;br /&gt;
The first step is to clean up the other launchChatNNN functionality in app-assistant.js which accepts Luna System calls from the notification dashboard items which are created when a new message is received on the phone. These code modifications are being tested currently, and will be posted when we figure out how to clear the new message counters in the main listview-assistant.js.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
= Character Counter =&lt;br /&gt;
&lt;br /&gt;
[[Image:Messaging_CharacterCounter.jpg|border|right|Character Counter]]&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
One of the features I liked about my old Treo was the character counter built-in to the messaging application. I thought it would be useful on the Pre, so I modified the messaging application to show the current character count. I made this a separate page from the other modifications because it requires many code changes. Maybe the other messaging modifications could be rolled into this page as well.&lt;br /&gt;
&lt;br /&gt;
== Procedure ==&lt;br /&gt;
&lt;br /&gt;
Run the following commands:&lt;br /&gt;
&lt;br /&gt;
''In this example, I have the patch file located in my home directory under '''patches'''''&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd /&lt;br /&gt;
sudo patch -p0 --backup-if-mismatch &amp;lt; ~/patches/charcounter.patch&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is what you should see if it ran properly:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
patching file /usr/palm/applications/com.palm.app.messaging/app/controllers/chatview-assistant.js&lt;br /&gt;
patching file /usr/palm/applications/com.palm.app.messaging/app/controllers/compose-assistant.js&lt;br /&gt;
patching file /usr/palm/applications/com.palm.app.messaging/app/utilities/CharacterCounter.js&lt;br /&gt;
patching file /usr/palm/applications/com.palm.app.messaging/app/views/chatview/chatview-scene.html&lt;br /&gt;
patching file /usr/palm/applications/com.palm.app.messaging/app/views/compose/compose-scene.html&lt;br /&gt;
patching file /usr/palm/applications/com.palm.app.messaging/stylesheets/messaging.css&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These modifications will require LunaSysMgr to be restarted. A rescan will not work. After you've run the commands above, run one more command:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
pkill LunaSysMgr&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== charcounter.patch ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;diff&amp;quot;&amp;gt;&lt;br /&gt;
diff -ur /usr/palm/applications/com.palm.app.messaging/app/controllers/chatview-assistant.js /usr/palm/app-modified/com.palm.app.messaging/app/controllers/chatview-assistant.js&lt;br /&gt;
--- /usr/palm/applications/com.palm.app.messaging/app/controllers/chatview-assistant.js	2009-07-18 00:22:14.000000000 -0500&lt;br /&gt;
+++ /usr/palm/app-modified/com.palm.app.messaging/app/controllers/chatview-assistant.js	2009-07-23 23:13:19.000000000 -0500&lt;br /&gt;
@@ -160,6 +160,11 @@&lt;br /&gt;
 				segmentCountContainer: this.controller.get('segmentCounterContainer'),&lt;br /&gt;
 				segmentCountElement: this.controller.get('segmentCounter'),&lt;br /&gt;
 				setTextFieldValueFn: this.setTextFieldValue.bind(this)&lt;br /&gt;
+			},&lt;br /&gt;
+			charCounter: {&lt;br /&gt;
+				charCountContainer: this.controller.get('charCounterContainer'),&lt;br /&gt;
+				charCountElement: this.controller.get('charCounter'),&lt;br /&gt;
+				setTextFieldValueFn: this.setTextFieldValue.bind(this)&lt;br /&gt;
 			}&lt;br /&gt;
 		};&lt;br /&gt;
 &lt;br /&gt;
diff -ur /usr/palm/applications/com.palm.app.messaging/app/controllers/compose-assistant.js /usr/palm/app-modified/com.palm.app.messaging/app/controllers/compose-assistant.js&lt;br /&gt;
--- /usr/palm/applications/com.palm.app.messaging/app/controllers/compose-assistant.js	2009-07-18 00:22:14.000000000 -0500&lt;br /&gt;
+++ /usr/palm/app-modified/com.palm.app.messaging/app/controllers/compose-assistant.js	2009-07-23 23:14:11.000000000 -0500&lt;br /&gt;
@@ -140,6 +140,11 @@&lt;br /&gt;
 			segmentCountContainer: this.controller.get('segmentCounterContainer'),&lt;br /&gt;
 			segmentCountElement: this.controller.get('segmentCounter'),&lt;br /&gt;
 			setTextFieldValueFn: this.setTextFieldValue.bind(this)&lt;br /&gt;
+		},&lt;br /&gt;
+		charCounter: {&lt;br /&gt;
+			charCountContainer: this.controller.get('charCounterContainer'),&lt;br /&gt;
+			charCountElement: this.controller.get('charCounter'),&lt;br /&gt;
+			setTextFieldValueFn: this.setTextFieldValue.bind(this)&lt;br /&gt;
 		}&lt;br /&gt;
 	};&lt;br /&gt;
 &lt;br /&gt;
diff -ur /usr/palm/applications/com.palm.app.messaging/app/utilities/CharacterCounter.js /usr/palm/app-modified/com.palm.app.messaging/app/utilities/CharacterCounter.js&lt;br /&gt;
--- /usr/palm/applications/com.palm.app.messaging/app/utilities/CharacterCounter.js	2009-07-18 00:22:14.000000000 -0500&lt;br /&gt;
+++ /usr/palm/app-modified/com.palm.app.messaging/app/utilities/CharacterCounter.js	2009-07-23 23:47:32.000000000 -0500&lt;br /&gt;
@@ -39,6 +39,10 @@&lt;br /&gt;
 				containerElement: null,&lt;br /&gt;
 				valueElement: null&lt;br /&gt;
 			};&lt;br /&gt;
+			var charCounterUI = {&lt;br /&gt;
+				containerElement: null,&lt;br /&gt;
+				valueElement: null&lt;br /&gt;
+			};&lt;br /&gt;
 			&lt;br /&gt;
 						&lt;br /&gt;
 			// TODO: eventually we might want to implement some cleverness that counts&lt;br /&gt;
@@ -185,6 +189,20 @@&lt;br /&gt;
 				}&lt;br /&gt;
 			};&lt;br /&gt;
 			&lt;br /&gt;
+			var setCurrentCharCount = function(newCharCount) {&lt;br /&gt;
+				if(charCounterUI.valueElement)&lt;br /&gt;
+					charCounterUI.valueElement.update(newCharCount);&lt;br /&gt;
+				if(charCounterUI.containerElement) {&lt;br /&gt;
+					if (newCharCount == 0) {&lt;br /&gt;
+						if (charCounterUI.containerElement.visible())&lt;br /&gt;
+							charCounterUI.containerElement.hide();&lt;br /&gt;
+					} else {&lt;br /&gt;
+						if (!charCounterUI.containerElement.visible())&lt;br /&gt;
+							charCounterUI.containerElement.show();&lt;br /&gt;
+					}&lt;br /&gt;
+				}&lt;br /&gt;
+			};&lt;br /&gt;
+			&lt;br /&gt;
 			return {&lt;br /&gt;
 				&lt;br /&gt;
 				init: function(controller,platform,textElement,params) {&lt;br /&gt;
@@ -265,7 +283,13 @@&lt;br /&gt;
 								setTextFieldValueFn = params.segmentCounter.setTextFieldValueFn;&lt;br /&gt;
 							}						&lt;br /&gt;
 						}&lt;br /&gt;
-&lt;br /&gt;
+						if(params.charCounter) {&lt;br /&gt;
+							charCounterUI.containerElement = params.charCounter.charCountContainer;&lt;br /&gt;
+							charCounterUI.valueElement = params.charCounter.charCountElement;&lt;br /&gt;
+							if(params.charCounter.setTextFieldValueFn) {&lt;br /&gt;
+								setTextFieldValueFn = params.charCounter.setTextFieldValueFn;&lt;br /&gt;
+							}						&lt;br /&gt;
+						}&lt;br /&gt;
 					}					&lt;br /&gt;
 				},&lt;br /&gt;
 				&lt;br /&gt;
@@ -304,6 +328,7 @@&lt;br /&gt;
 					var rawCharacterData = getRawCharacterData();&lt;br /&gt;
 					var messageData = parseMessage(rawCharacterData.message,rawCharacterData.count,_maxLength,true);&lt;br /&gt;
 					adjustedCharacterCount = messageData.adjustedCharacterCount;&lt;br /&gt;
+					setCurrentCharCount(rawCharacterData.count);&lt;br /&gt;
 					if (_maxLength &amp;gt; 0)&lt;br /&gt;
 						setOverLimit(messageData.isOverLimit);&lt;br /&gt;
 					setCurrentSegmentCount(messageData.segmentCount);				&lt;br /&gt;
diff -ur /usr/palm/applications/com.palm.app.messaging/app/views/chatview/chatview-scene.html /usr/palm/app-modified/com.palm.app.messaging/app/views/chatview/chatview-scene.html&lt;br /&gt;
--- /usr/palm/applications/com.palm.app.messaging/app/views/chatview/chatview-scene.html	2009-07-18 00:22:14.000000000 -0500&lt;br /&gt;
+++ /usr/palm/app-modified/com.palm.app.messaging/app/views/chatview/chatview-scene.html	2009-07-23 23:16:55.000000000 -0500&lt;br /&gt;
@@ -22,6 +22,10 @@&lt;br /&gt;
 			&amp;lt;div id=&amp;quot;messageContainer&amp;quot; class='palm-row'&amp;gt;&lt;br /&gt;
 				&amp;lt;div class=&amp;quot;palm-row-wrapper textfield-group focused&amp;quot;&amp;gt;&lt;br /&gt;
 					&amp;lt;div class=&amp;quot;title&amp;quot;&amp;gt;&lt;br /&gt;
+						&amp;lt;div id=&amp;quot;charCounterContainer&amp;quot;&amp;gt;&lt;br /&gt;
+							&amp;lt;div id=&amp;quot;charCounter&amp;quot;&amp;gt;&lt;br /&gt;
+							&amp;lt;/div&amp;gt;&lt;br /&gt;
+						&amp;lt;/div&amp;gt;&lt;br /&gt;
 						&amp;lt;div id=&amp;quot;attachmentContainer&amp;quot; style=&amp;quot;display: none;&amp;quot;&amp;gt;&lt;br /&gt;
 							&amp;lt;div id=&amp;quot;cancelAttachment&amp;quot;&amp;gt;&lt;br /&gt;
 							&amp;lt;/div&amp;gt;&lt;br /&gt;
diff -ur /usr/palm/applications/com.palm.app.messaging/app/views/compose/compose-scene.html /usr/palm/app-modified/com.palm.app.messaging/app/views/compose/compose-scene.html&lt;br /&gt;
--- /usr/palm/applications/com.palm.app.messaging/app/views/compose/compose-scene.html	2009-07-18 00:22:14.000000000 -0500&lt;br /&gt;
+++ /usr/palm/app-modified/com.palm.app.messaging/app/views/compose/compose-scene.html	2009-07-23 23:17:14.000000000 -0500&lt;br /&gt;
@@ -6,6 +6,10 @@&lt;br /&gt;
 		&amp;lt;div id=&amp;quot;messageContainer&amp;quot; class='palm-row'&amp;gt;&lt;br /&gt;
 			&amp;lt;div class=&amp;quot;palm-row-wrapper textfield-group focused&amp;quot;&amp;gt;&lt;br /&gt;
 				&amp;lt;div class=&amp;quot;title&amp;quot;&amp;gt;&lt;br /&gt;
+					&amp;lt;div id=&amp;quot;charCounterContainer&amp;quot;&amp;gt;&lt;br /&gt;
+						&amp;lt;div id=&amp;quot;charCounter&amp;quot;&amp;gt;&lt;br /&gt;
+						&amp;lt;/div&amp;gt;&lt;br /&gt;
+					&amp;lt;/div&amp;gt;&lt;br /&gt;
 					&amp;lt;div id=&amp;quot;attachmentContainer&amp;quot; style=&amp;quot;display: none;&amp;quot;&amp;gt;&lt;br /&gt;
 						&amp;lt;div id=&amp;quot;cancelAttachment&amp;quot;&amp;gt;&lt;br /&gt;
 						&amp;lt;/div&amp;gt;&lt;br /&gt;
diff -ur /usr/palm/applications/com.palm.app.messaging/stylesheets/messaging.css /usr/palm/app-modified/com.palm.app.messaging/stylesheets/messaging.css&lt;br /&gt;
--- /usr/palm/applications/com.palm.app.messaging/stylesheets/messaging.css	2009-07-18 00:22:22.000000000 -0500&lt;br /&gt;
+++ /usr/palm/app-modified/com.palm.app.messaging/stylesheets/messaging.css	2009-07-23 23:19:25.000000000 -0500&lt;br /&gt;
@@ -837,6 +837,23 @@&lt;br /&gt;
 #messageContainer.palm-row .icon.right {&lt;br /&gt;
 	height: 61px;&lt;br /&gt;
 }&lt;br /&gt;
+#messageContainer #charCounterContainer {&lt;br /&gt;
+	line-height: 20px;&lt;br /&gt;
+	display:block;&lt;br /&gt;
+	height: 20px;&lt;br /&gt;
+	border-width: 0px 10px 0px 9px;&lt;br /&gt;
+	-webkit-border-image: url(../images/message-segment-badge.png) 0 10 0 9 stretch stretch;&lt;br /&gt;
+	position: absolute;&lt;br /&gt;
+	z-index: 3;&lt;br /&gt;
+	top: 2px;&lt;br /&gt;
+	left: 2px;&lt;br /&gt;
+}&lt;br /&gt;
+#messageContainer #charCounterContainer #charCounter {&lt;br /&gt;
+	font-size: 12px;&lt;br /&gt;
+	font-weight: bold;&lt;br /&gt;
+	color: #679BC2;&lt;br /&gt;
+	margin: 0px -4px 3px -3px;&lt;br /&gt;
+}&lt;br /&gt;
 #messageContainer #attachmentContainer {&lt;br /&gt;
 	position: relative;&lt;br /&gt;
 	margin-top:10px;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Post os1.1 update, you will need to swap in the following for the utilities/CharacterCounter.js section: (mod confirmed working by tcurtin, 7/24/09)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;diff&amp;quot;&amp;gt;&lt;br /&gt;
diff -ur /usr/palm/applications/com.palm.app.messaging/app/utilities/CharacterCounter.js /usr/palm/app-modified/com.palm.app.messaging/app/utilities/CharacterCounter.js&lt;br /&gt;
--- /usr/palm/applications/com.palm.app.messaging/app/utilities/CharacterCounter.js	2009-07-18 00:22:14.000000000 -0500&lt;br /&gt;
+++ /usr/palm/app-modified/com.palm.app.messaging/app/utilities/CharacterCounter.js	2009-07-24 12:20:12.000000000 -0500&lt;br /&gt;
@@ -39,6 +39,11 @@&lt;br /&gt;
                                containerElement: null,&lt;br /&gt;
                                valueElement: null&lt;br /&gt;
                        };&lt;br /&gt;
+                       var charCounterUI = {&lt;br /&gt;
+                               containerElement: null,&lt;br /&gt;
+                               valueElement: null&lt;br /&gt;
+                       };&lt;br /&gt;
+&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                        // TODO: eventually we might want to implement some cleverness that counts&lt;br /&gt;
@@ -51,6 +56,10 @@&lt;br /&gt;
                                var message = textAreaElement.value;&lt;br /&gt;
                                return {count:message.length, message:message};&lt;br /&gt;
                        };&lt;br /&gt;
+                       var charCounterUI = {&lt;br /&gt;
+                               containerElement: null,&lt;br /&gt;
+                               valueElement: null&lt;br /&gt;
+                       };&lt;br /&gt;
&lt;br /&gt;
                        var setOverLimit = function(isOver) {&lt;br /&gt;
                                if (isOver) {&lt;br /&gt;
@@ -185,6 +194,21 @@&lt;br /&gt;
                                }&lt;br /&gt;
                        };&lt;br /&gt;
&lt;br /&gt;
+                       var setCurrentCharCount = function(newCharCount) {&lt;br /&gt;
+                               if(charCounterUI.valueElement)&lt;br /&gt;
+                                       charCounterUI.valueElement.update(newCharCount);&lt;br /&gt;
+                               if(charCounterUI.containerElement) {&lt;br /&gt;
+                                       if (newCharCount == 0) {&lt;br /&gt;
+                                               if (charCounterUI.containerElement.visible())&lt;br /&gt;
+                                                       charCounterUI.containerElement.hide();&lt;br /&gt;
+                                       } else {&lt;br /&gt;
+                                               if (!charCounterUI.containerElement.visible())&lt;br /&gt;
+                                                       charCounterUI.containerElement.show();&lt;br /&gt;
+                                       }&lt;br /&gt;
+                               }&lt;br /&gt;
+                       };&lt;br /&gt;
+&lt;br /&gt;
+&lt;br /&gt;
                        return {&lt;br /&gt;
&lt;br /&gt;
                                init: function(controller,platform,textElement,params) {&lt;br /&gt;
@@ -265,7 +289,13 @@&lt;br /&gt;
                                                                setTextFieldValueFn = params.segmentCounter.setTextFieldValueFn;&lt;br /&gt;
                                                        }&lt;br /&gt;
                                                }&lt;br /&gt;
-&lt;br /&gt;
+                                               if(params.charCounter) {&lt;br /&gt;
+                                                       charCounterUI.containerElement = params.charCounter.charCountContainer;&lt;br /&gt;
+                                                       charCounterUI.valueElement = params.charCounter.charCountElement;&lt;br /&gt;
+                                                       if(params.charCounter.setTextFieldValueFn) {&lt;br /&gt;
+                                                               setTextFieldValueFn = params.charCounter.setTextFieldValueFn;&lt;br /&gt;
+                                                       }&lt;br /&gt;
+                                               }&lt;br /&gt;
                                        }&lt;br /&gt;
                                },&lt;br /&gt;
&lt;br /&gt;
@@ -304,6 +334,7 @@&lt;br /&gt;
                                        var rawCharacterData = getRawCharacterData();&lt;br /&gt;
                                        var messageData = parseMessage(rawCharacterData.message,rawCharacterData.count,_maxLength,true);&lt;br /&gt;
                                        adjustedCharacterCount = messageData.adjustedCharacterCount;&lt;br /&gt;
+                                       setCurrentCharCount(rawCharacterData.count);&lt;br /&gt;
                                        if (_maxLength &amp;gt; 0)&lt;br /&gt;
                                                setOverLimit(messageData.isOverLimit);&lt;br /&gt;
                                        setCurrentSegmentCount(messageData.segmentCount);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Acknowledgements ==&lt;br /&gt;
&lt;br /&gt;
* [[User:HattCzech|HattCzech]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
= Force Offline Send Without Dialog =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo mount -o remount,rw /&lt;br /&gt;
sudo vi /usr/palm/applications/com.palm.app.messaging/app/controllers/chatview-assistant.js&lt;br /&gt;
/forceSendIfOffline =&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Change the line to true (below) , writequit , remount, reload , enjoy &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
forceSendIfOffline = true; &lt;br /&gt;
:wq &lt;br /&gt;
sudo mount -o remount,ro /&lt;br /&gt;
sudo stop LunaSysMgr ; sudo start LunaSysMgr&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Jspin72</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Messaging_Mods&amp;diff=2790</id>
		<title>Messaging Mods</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Messaging_Mods&amp;diff=2790"/>
		<updated>2009-07-28T19:09:56Z</updated>

		<summary type="html">&lt;p&gt;Jspin72: /* Procedure */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;All files are located in '''/usr/palm/applications/com.palm.app.messaging/'''&lt;br /&gt;
&lt;br /&gt;
= Add Timestamps to All Messages =&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
A number of users have requested adding timestamps to each message that arrives on the device.&lt;br /&gt;
Palm actually goes out of their way to group messages that have arrived during various time intervals,&lt;br /&gt;
but if you'd prefer to see a timestamp on each message, simply follow the instructions below.&lt;br /&gt;
&lt;br /&gt;
== Procedure ==&lt;br /&gt;
&lt;br /&gt;
# [[Portal:Accessing_Linux|Gain root access to your device]]&lt;br /&gt;
# Remount the file system as read/write&lt;br /&gt;
# cd to '''/usr/palm/applications/com.palm.app.messaging/app/controllers/'''&lt;br /&gt;
# Backup '''chatview-assistant.js''' (just to be safe)&lt;br /&gt;
# Open '''chatview-assistant.js''' and comment out the following lines:&lt;br /&gt;
#* 1169 (webOS 1.1: '''1242''') - line that starts with: '''if(!ChatFlags.'''&lt;br /&gt;
#* 1177 (webOS 1.1: '''1250''') - line that starts with: '''if(today-msg.'''&lt;br /&gt;
#* 1179 (webOS 1.1: '''1252''') - first closing bracket on its own line: '''}'''&lt;br /&gt;
#* 1180 (webOS 1.1: '''1253''') - second closing bracket on its own line: '''}'''&lt;br /&gt;
# Save the file and exit the editor&lt;br /&gt;
# Remount the file system as read-only&lt;br /&gt;
# Logout of your root session&lt;br /&gt;
# Reboot the device&lt;br /&gt;
&lt;br /&gt;
You should now see a full timestamp on all received messages.&lt;br /&gt;
&lt;br /&gt;
== Acknowledgements ==&lt;br /&gt;
&lt;br /&gt;
Thanks to [[User:tk102|tk102]] and [[User:scuba_steve|scuba_steve]] on [http://www.precentral.net/  PreCentral] for the mod.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
= Add Timestamps to All Messages - another approach =&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The method described above is the easiest way to display message timestamps.  I went a little farther since I didn't want the &amp;quot;Message Sent:&amp;quot; label and I also wanted to format the string a bit more.  While I was at it, I also modified the view for the message text to display as pre-formatted text since text messages are text after all, not html.&lt;br /&gt;
&lt;br /&gt;
== Procedure ==&lt;br /&gt;
&lt;br /&gt;
* same as steps 1 - 3 above&lt;br /&gt;
* save a backup of /usr/palm/applications/com.palm.app.messaging/&lt;br /&gt;
** stylesheets/messaging.css&lt;br /&gt;
** app/views/chatview/message/message-text.html&lt;br /&gt;
** app/controllers/chatview-assistant.js&lt;br /&gt;
* edit stylesheets/messaging.css&lt;br /&gt;
** search for the string 'messageText' and append the following after its style definition&lt;br /&gt;
&lt;br /&gt;
 .messageText pre {&lt;br /&gt;
    font-family: inherit;&lt;br /&gt;
    font-size: inherit;&lt;br /&gt;
    color: inherit;&lt;br /&gt;
 }&lt;br /&gt;
 .timeStamp {&lt;br /&gt;
    font-size: 12px;&lt;br /&gt;
    font-style: italic;&lt;br /&gt;
    color: #1111ff;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
**feel free to change the style to your liking.  I tried using 'white-space: pre-wrap' in the .messageText class but it didn't behave as expected, hence the use of the pre tag.&lt;br /&gt;
* edit app/views/chatview/message/message-text.html&lt;br /&gt;
** change the single line to:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&amp;lt;div class=&amp;quot;messageText&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;#{-messageText}&amp;lt;/pre&amp;gt; #{-errorContent}&amp;lt;span class=&amp;quot;timeStamp&amp;quot;&amp;gt;#{-timeStampText}&amp;lt;/span&amp;lt;/div&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* edit app/controllers/chatview-assistant.js&lt;br /&gt;
** search for the string 'preFormatChatList:' and just below that look for 'var msg = stuff.list[i];'&lt;br /&gt;
** somewhere after that line (within the for loop) add the following:&lt;br /&gt;
 var ts = new Date();&lt;br /&gt;
 ts.setTime(msg.deviceTimeStamp);&lt;br /&gt;
 msg.timeStampText = Mojo.Format.formatDate(ts,'short');&lt;br /&gt;
** note that I used msg.deviceTimeStamp which I believe is when your phone sent/received the message.  If you'd prefer the time it was actually sent by the sender, use msg.timeStamp instead.  while you're in here, you may consider applying the [[Change_Enter_To_Create_Newline_Instead_of_Send_Message|send on return behavior]] changes.&lt;br /&gt;
* restart LunaSysMgr or reboot&lt;br /&gt;
&lt;br /&gt;
be sure to save the files you modified as they could get overwritten on the next sprint update.  better yet, install [[Applying_Patches|quilt]] to manage the diffs as a patch.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
= New Card For Each Conversation =&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The message app can be a pain when you have multiple conversations going on. You often have to swipe back and then pick someone else. &lt;br /&gt;
It gets annoying fast. This modification modifies the messaging application so that a new card is created whenever you click into a conversation.&lt;br /&gt;
&lt;br /&gt;
== Procedure ==&lt;br /&gt;
&lt;br /&gt;
Edit '''/usr/palm/applications/com.palm.app.messaging/app/controllers/listview-assistant.js''' and replace the launchChatView function with the following function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
launchChatView: function(chatThreadId) {&lt;br /&gt;
    //Need to jump to that stage if it exists&lt;br /&gt;
    var stageController = Mojo.Controller.appController.getStageController(&amp;quot;messaging&amp;quot;+chatThreadId);&lt;br /&gt;
        if (stageController) {&lt;br /&gt;
            stageController.activate();&lt;br /&gt;
            return;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
    var params = {name: 'messaging' + chatThreadId,&lt;br /&gt;
            lightweight: Mojo.Controller.appInfo.lwStages&lt;br /&gt;
    };&lt;br /&gt;
&lt;br /&gt;
    var callback = function(controller) {&lt;br /&gt;
        controller.pushScene('chatview',chatThreadId,{&lt;br /&gt;
                    focusWindow: true&lt;br /&gt;
                });        &lt;br /&gt;
    };&lt;br /&gt;
&lt;br /&gt;
    Mojo.Controller.getAppController().createStageWithCallback(params, callback); //doesnt create ifit exists sooo&lt;br /&gt;
  },&lt;br /&gt;
&lt;br /&gt;
  clearListBadgeForChatThreadId: function(chatThreadId) {&lt;br /&gt;
    var badgeContainers = [&amp;quot;buddyBageContainer&amp;quot;,&amp;quot;historyBageContainer&amp;quot;];&lt;br /&gt;
    var listItem;&lt;br /&gt;
    for (var i = 0; i &amp;lt; badgeContainers.length; i++) {&lt;br /&gt;
        listItem = this.controller.get(badgeContainers[i] + chatThreadId);&lt;br /&gt;
        if (listItem &amp;amp;&amp;amp; !listItem.hasClassName('hide-unread-count')) {&lt;br /&gt;
            listItem.addClassName('hide-unread-count');&lt;br /&gt;
        }&lt;br /&gt;
    }    &lt;br /&gt;
  },&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now in '''/usr/palm/applications/com.palm.app.messaging/app/controllers/chatview-assistant.js''', comment out lines 246 and 247 (webOS 1.1: comment out lines '''289''' and '''290''').&lt;br /&gt;
This change will ensure that if you use the &amp;quot;back gesture&amp;quot; in a chat, the application doesn't bring you back to the conversation list...or do anything else.&lt;br /&gt;
&lt;br /&gt;
To &amp;quot;comment out&amp;quot; a line, add // at the beginning. Example:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
printf(&amp;quot;This is code&amp;quot;);&lt;br /&gt;
//printf(&amp;quot;This is commented out&amp;quot;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Concerns ==&lt;br /&gt;
There is some delay in creating the new cards. I'm not sure why though.&lt;br /&gt;
As stated above, the cards are only opened when you click into the conversation.  Responding to a notification will result in the reuse of the buddy list window, and you have disabled the back gesture.&lt;br /&gt;
&lt;br /&gt;
== Acknolwedgements ==&lt;br /&gt;
&lt;br /&gt;
Thanks to [[User:mikedg|mikedg]] for the mod.&lt;br /&gt;
&lt;br /&gt;
[[User:chris_phelps|chris_phelps]] is continuing to work on this modification to get it working more completely.&lt;br /&gt;
The first step is to clean up the other launchChatNNN functionality in app-assistant.js which accepts Luna System calls from the notification dashboard items which are created when a new message is received on the phone. These code modifications are being tested currently, and will be posted when we figure out how to clear the new message counters in the main listview-assistant.js.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
= Character Counter =&lt;br /&gt;
&lt;br /&gt;
[[Image:Messaging_CharacterCounter.jpg|border|right|Character Counter]]&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
One of the features I liked about my old Treo was the character counter built-in to the messaging application. I thought it would be useful on the Pre, so I modified the messaging application to show the current character count. I made this a separate page from the other modifications because it requires many code changes. Maybe the other messaging modifications could be rolled into this page as well.&lt;br /&gt;
&lt;br /&gt;
== Procedure ==&lt;br /&gt;
&lt;br /&gt;
Run the following commands:&lt;br /&gt;
&lt;br /&gt;
''In this example, I have the patch file located in my home directory under '''patches'''''&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd /&lt;br /&gt;
sudo patch -p0 --backup-if-mismatch &amp;lt; ~/patches/charcounter.patch&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is what you should see if it ran properly:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
patching file /usr/palm/applications/com.palm.app.messaging/app/controllers/chatview-assistant.js&lt;br /&gt;
patching file /usr/palm/applications/com.palm.app.messaging/app/controllers/compose-assistant.js&lt;br /&gt;
patching file /usr/palm/applications/com.palm.app.messaging/app/utilities/CharacterCounter.js&lt;br /&gt;
patching file /usr/palm/applications/com.palm.app.messaging/app/views/chatview/chatview-scene.html&lt;br /&gt;
patching file /usr/palm/applications/com.palm.app.messaging/app/views/compose/compose-scene.html&lt;br /&gt;
patching file /usr/palm/applications/com.palm.app.messaging/stylesheets/messaging.css&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These modifications will require LunaSysMgr to be restarted. A rescan will not work. After you've run the commands above, run one more command:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
pkill LunaSysMgr&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== charcounter.patch ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;diff&amp;quot;&amp;gt;&lt;br /&gt;
diff -ur /usr/palm/applications/com.palm.app.messaging/app/controllers/chatview-assistant.js /usr/palm/app-modified/com.palm.app.messaging/app/controllers/chatview-assistant.js&lt;br /&gt;
--- /usr/palm/applications/com.palm.app.messaging/app/controllers/chatview-assistant.js	2009-07-18 00:22:14.000000000 -0500&lt;br /&gt;
+++ /usr/palm/app-modified/com.palm.app.messaging/app/controllers/chatview-assistant.js	2009-07-23 23:13:19.000000000 -0500&lt;br /&gt;
@@ -160,6 +160,11 @@&lt;br /&gt;
 				segmentCountContainer: this.controller.get('segmentCounterContainer'),&lt;br /&gt;
 				segmentCountElement: this.controller.get('segmentCounter'),&lt;br /&gt;
 				setTextFieldValueFn: this.setTextFieldValue.bind(this)&lt;br /&gt;
+			},&lt;br /&gt;
+			charCounter: {&lt;br /&gt;
+				charCountContainer: this.controller.get('charCounterContainer'),&lt;br /&gt;
+				charCountElement: this.controller.get('charCounter'),&lt;br /&gt;
+				setTextFieldValueFn: this.setTextFieldValue.bind(this)&lt;br /&gt;
 			}&lt;br /&gt;
 		};&lt;br /&gt;
 &lt;br /&gt;
diff -ur /usr/palm/applications/com.palm.app.messaging/app/controllers/compose-assistant.js /usr/palm/app-modified/com.palm.app.messaging/app/controllers/compose-assistant.js&lt;br /&gt;
--- /usr/palm/applications/com.palm.app.messaging/app/controllers/compose-assistant.js	2009-07-18 00:22:14.000000000 -0500&lt;br /&gt;
+++ /usr/palm/app-modified/com.palm.app.messaging/app/controllers/compose-assistant.js	2009-07-23 23:14:11.000000000 -0500&lt;br /&gt;
@@ -140,6 +140,11 @@&lt;br /&gt;
 			segmentCountContainer: this.controller.get('segmentCounterContainer'),&lt;br /&gt;
 			segmentCountElement: this.controller.get('segmentCounter'),&lt;br /&gt;
 			setTextFieldValueFn: this.setTextFieldValue.bind(this)&lt;br /&gt;
+		},&lt;br /&gt;
+		charCounter: {&lt;br /&gt;
+			charCountContainer: this.controller.get('charCounterContainer'),&lt;br /&gt;
+			charCountElement: this.controller.get('charCounter'),&lt;br /&gt;
+			setTextFieldValueFn: this.setTextFieldValue.bind(this)&lt;br /&gt;
 		}&lt;br /&gt;
 	};&lt;br /&gt;
 &lt;br /&gt;
diff -ur /usr/palm/applications/com.palm.app.messaging/app/utilities/CharacterCounter.js /usr/palm/app-modified/com.palm.app.messaging/app/utilities/CharacterCounter.js&lt;br /&gt;
--- /usr/palm/applications/com.palm.app.messaging/app/utilities/CharacterCounter.js	2009-07-18 00:22:14.000000000 -0500&lt;br /&gt;
+++ /usr/palm/app-modified/com.palm.app.messaging/app/utilities/CharacterCounter.js	2009-07-23 23:47:32.000000000 -0500&lt;br /&gt;
@@ -39,6 +39,10 @@&lt;br /&gt;
 				containerElement: null,&lt;br /&gt;
 				valueElement: null&lt;br /&gt;
 			};&lt;br /&gt;
+			var charCounterUI = {&lt;br /&gt;
+				containerElement: null,&lt;br /&gt;
+				valueElement: null&lt;br /&gt;
+			};&lt;br /&gt;
 			&lt;br /&gt;
 						&lt;br /&gt;
 			// TODO: eventually we might want to implement some cleverness that counts&lt;br /&gt;
@@ -185,6 +189,20 @@&lt;br /&gt;
 				}&lt;br /&gt;
 			};&lt;br /&gt;
 			&lt;br /&gt;
+			var setCurrentCharCount = function(newCharCount) {&lt;br /&gt;
+				if(charCounterUI.valueElement)&lt;br /&gt;
+					charCounterUI.valueElement.update(newCharCount);&lt;br /&gt;
+				if(charCounterUI.containerElement) {&lt;br /&gt;
+					if (newCharCount == 0) {&lt;br /&gt;
+						if (charCounterUI.containerElement.visible())&lt;br /&gt;
+							charCounterUI.containerElement.hide();&lt;br /&gt;
+					} else {&lt;br /&gt;
+						if (!charCounterUI.containerElement.visible())&lt;br /&gt;
+							charCounterUI.containerElement.show();&lt;br /&gt;
+					}&lt;br /&gt;
+				}&lt;br /&gt;
+			};&lt;br /&gt;
+			&lt;br /&gt;
 			return {&lt;br /&gt;
 				&lt;br /&gt;
 				init: function(controller,platform,textElement,params) {&lt;br /&gt;
@@ -265,7 +283,13 @@&lt;br /&gt;
 								setTextFieldValueFn = params.segmentCounter.setTextFieldValueFn;&lt;br /&gt;
 							}						&lt;br /&gt;
 						}&lt;br /&gt;
-&lt;br /&gt;
+						if(params.charCounter) {&lt;br /&gt;
+							charCounterUI.containerElement = params.charCounter.charCountContainer;&lt;br /&gt;
+							charCounterUI.valueElement = params.charCounter.charCountElement;&lt;br /&gt;
+							if(params.charCounter.setTextFieldValueFn) {&lt;br /&gt;
+								setTextFieldValueFn = params.charCounter.setTextFieldValueFn;&lt;br /&gt;
+							}						&lt;br /&gt;
+						}&lt;br /&gt;
 					}					&lt;br /&gt;
 				},&lt;br /&gt;
 				&lt;br /&gt;
@@ -304,6 +328,7 @@&lt;br /&gt;
 					var rawCharacterData = getRawCharacterData();&lt;br /&gt;
 					var messageData = parseMessage(rawCharacterData.message,rawCharacterData.count,_maxLength,true);&lt;br /&gt;
 					adjustedCharacterCount = messageData.adjustedCharacterCount;&lt;br /&gt;
+					setCurrentCharCount(rawCharacterData.count);&lt;br /&gt;
 					if (_maxLength &amp;gt; 0)&lt;br /&gt;
 						setOverLimit(messageData.isOverLimit);&lt;br /&gt;
 					setCurrentSegmentCount(messageData.segmentCount);				&lt;br /&gt;
diff -ur /usr/palm/applications/com.palm.app.messaging/app/views/chatview/chatview-scene.html /usr/palm/app-modified/com.palm.app.messaging/app/views/chatview/chatview-scene.html&lt;br /&gt;
--- /usr/palm/applications/com.palm.app.messaging/app/views/chatview/chatview-scene.html	2009-07-18 00:22:14.000000000 -0500&lt;br /&gt;
+++ /usr/palm/app-modified/com.palm.app.messaging/app/views/chatview/chatview-scene.html	2009-07-23 23:16:55.000000000 -0500&lt;br /&gt;
@@ -22,6 +22,10 @@&lt;br /&gt;
 			&amp;lt;div id=&amp;quot;messageContainer&amp;quot; class='palm-row'&amp;gt;&lt;br /&gt;
 				&amp;lt;div class=&amp;quot;palm-row-wrapper textfield-group focused&amp;quot;&amp;gt;&lt;br /&gt;
 					&amp;lt;div class=&amp;quot;title&amp;quot;&amp;gt;&lt;br /&gt;
+						&amp;lt;div id=&amp;quot;charCounterContainer&amp;quot;&amp;gt;&lt;br /&gt;
+							&amp;lt;div id=&amp;quot;charCounter&amp;quot;&amp;gt;&lt;br /&gt;
+							&amp;lt;/div&amp;gt;&lt;br /&gt;
+						&amp;lt;/div&amp;gt;&lt;br /&gt;
 						&amp;lt;div id=&amp;quot;attachmentContainer&amp;quot; style=&amp;quot;display: none;&amp;quot;&amp;gt;&lt;br /&gt;
 							&amp;lt;div id=&amp;quot;cancelAttachment&amp;quot;&amp;gt;&lt;br /&gt;
 							&amp;lt;/div&amp;gt;&lt;br /&gt;
diff -ur /usr/palm/applications/com.palm.app.messaging/app/views/compose/compose-scene.html /usr/palm/app-modified/com.palm.app.messaging/app/views/compose/compose-scene.html&lt;br /&gt;
--- /usr/palm/applications/com.palm.app.messaging/app/views/compose/compose-scene.html	2009-07-18 00:22:14.000000000 -0500&lt;br /&gt;
+++ /usr/palm/app-modified/com.palm.app.messaging/app/views/compose/compose-scene.html	2009-07-23 23:17:14.000000000 -0500&lt;br /&gt;
@@ -6,6 +6,10 @@&lt;br /&gt;
 		&amp;lt;div id=&amp;quot;messageContainer&amp;quot; class='palm-row'&amp;gt;&lt;br /&gt;
 			&amp;lt;div class=&amp;quot;palm-row-wrapper textfield-group focused&amp;quot;&amp;gt;&lt;br /&gt;
 				&amp;lt;div class=&amp;quot;title&amp;quot;&amp;gt;&lt;br /&gt;
+					&amp;lt;div id=&amp;quot;charCounterContainer&amp;quot;&amp;gt;&lt;br /&gt;
+						&amp;lt;div id=&amp;quot;charCounter&amp;quot;&amp;gt;&lt;br /&gt;
+						&amp;lt;/div&amp;gt;&lt;br /&gt;
+					&amp;lt;/div&amp;gt;&lt;br /&gt;
 					&amp;lt;div id=&amp;quot;attachmentContainer&amp;quot; style=&amp;quot;display: none;&amp;quot;&amp;gt;&lt;br /&gt;
 						&amp;lt;div id=&amp;quot;cancelAttachment&amp;quot;&amp;gt;&lt;br /&gt;
 						&amp;lt;/div&amp;gt;&lt;br /&gt;
diff -ur /usr/palm/applications/com.palm.app.messaging/stylesheets/messaging.css /usr/palm/app-modified/com.palm.app.messaging/stylesheets/messaging.css&lt;br /&gt;
--- /usr/palm/applications/com.palm.app.messaging/stylesheets/messaging.css	2009-07-18 00:22:22.000000000 -0500&lt;br /&gt;
+++ /usr/palm/app-modified/com.palm.app.messaging/stylesheets/messaging.css	2009-07-23 23:19:25.000000000 -0500&lt;br /&gt;
@@ -837,6 +837,23 @@&lt;br /&gt;
 #messageContainer.palm-row .icon.right {&lt;br /&gt;
 	height: 61px;&lt;br /&gt;
 }&lt;br /&gt;
+#messageContainer #charCounterContainer {&lt;br /&gt;
+	line-height: 20px;&lt;br /&gt;
+	display:block;&lt;br /&gt;
+	height: 20px;&lt;br /&gt;
+	border-width: 0px 10px 0px 9px;&lt;br /&gt;
+	-webkit-border-image: url(../images/message-segment-badge.png) 0 10 0 9 stretch stretch;&lt;br /&gt;
+	position: absolute;&lt;br /&gt;
+	z-index: 3;&lt;br /&gt;
+	top: 2px;&lt;br /&gt;
+	left: 2px;&lt;br /&gt;
+}&lt;br /&gt;
+#messageContainer #charCounterContainer #charCounter {&lt;br /&gt;
+	font-size: 12px;&lt;br /&gt;
+	font-weight: bold;&lt;br /&gt;
+	color: #679BC2;&lt;br /&gt;
+	margin: 0px -4px 3px -3px;&lt;br /&gt;
+}&lt;br /&gt;
 #messageContainer #attachmentContainer {&lt;br /&gt;
 	position: relative;&lt;br /&gt;
 	margin-top:10px;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Post os1.1 update, you will need to swap in the following for the utilities/CharacterCounter.js section: (mod confirmed working by tcurtin, 7/24/09)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;diff&amp;quot;&amp;gt;&lt;br /&gt;
diff -ur /usr/palm/applications/com.palm.app.messaging/app/utilities/CharacterCounter.js /usr/palm/app-modified/com.palm.app.messaging/app/utilities/CharacterCounter.js&lt;br /&gt;
--- /usr/palm/applications/com.palm.app.messaging/app/utilities/CharacterCounter.js	2009-07-18 00:22:14.000000000 -0500&lt;br /&gt;
+++ /usr/palm/app-modified/com.palm.app.messaging/app/utilities/CharacterCounter.js	2009-07-24 12:20:12.000000000 -0500&lt;br /&gt;
@@ -39,6 +39,11 @@&lt;br /&gt;
                                containerElement: null,&lt;br /&gt;
                                valueElement: null&lt;br /&gt;
                        };&lt;br /&gt;
+                       var charCounterUI = {&lt;br /&gt;
+                               containerElement: null,&lt;br /&gt;
+                               valueElement: null&lt;br /&gt;
+                       };&lt;br /&gt;
+&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                        // TODO: eventually we might want to implement some cleverness that counts&lt;br /&gt;
@@ -51,6 +56,10 @@&lt;br /&gt;
                                var message = textAreaElement.value;&lt;br /&gt;
                                return {count:message.length, message:message};&lt;br /&gt;
                        };&lt;br /&gt;
+                       var charCounterUI = {&lt;br /&gt;
+                               containerElement: null,&lt;br /&gt;
+                               valueElement: null&lt;br /&gt;
+                       };&lt;br /&gt;
&lt;br /&gt;
                        var setOverLimit = function(isOver) {&lt;br /&gt;
                                if (isOver) {&lt;br /&gt;
@@ -185,6 +194,21 @@&lt;br /&gt;
                                }&lt;br /&gt;
                        };&lt;br /&gt;
&lt;br /&gt;
+                       var setCurrentCharCount = function(newCharCount) {&lt;br /&gt;
+                               if(charCounterUI.valueElement)&lt;br /&gt;
+                                       charCounterUI.valueElement.update(newCharCount);&lt;br /&gt;
+                               if(charCounterUI.containerElement) {&lt;br /&gt;
+                                       if (newCharCount == 0) {&lt;br /&gt;
+                                               if (charCounterUI.containerElement.visible())&lt;br /&gt;
+                                                       charCounterUI.containerElement.hide();&lt;br /&gt;
+                                       } else {&lt;br /&gt;
+                                               if (!charCounterUI.containerElement.visible())&lt;br /&gt;
+                                                       charCounterUI.containerElement.show();&lt;br /&gt;
+                                       }&lt;br /&gt;
+                               }&lt;br /&gt;
+                       };&lt;br /&gt;
+&lt;br /&gt;
+&lt;br /&gt;
                        return {&lt;br /&gt;
&lt;br /&gt;
                                init: function(controller,platform,textElement,params) {&lt;br /&gt;
@@ -265,7 +289,13 @@&lt;br /&gt;
                                                                setTextFieldValueFn = params.segmentCounter.setTextFieldValueFn;&lt;br /&gt;
                                                        }&lt;br /&gt;
                                                }&lt;br /&gt;
-&lt;br /&gt;
+                                               if(params.charCounter) {&lt;br /&gt;
+                                                       charCounterUI.containerElement = params.charCounter.charCountContainer;&lt;br /&gt;
+                                                       charCounterUI.valueElement = params.charCounter.charCountElement;&lt;br /&gt;
+                                                       if(params.charCounter.setTextFieldValueFn) {&lt;br /&gt;
+                                                               setTextFieldValueFn = params.charCounter.setTextFieldValueFn;&lt;br /&gt;
+                                                       }&lt;br /&gt;
+                                               }&lt;br /&gt;
                                        }&lt;br /&gt;
                                },&lt;br /&gt;
&lt;br /&gt;
@@ -304,6 +334,7 @@&lt;br /&gt;
                                        var rawCharacterData = getRawCharacterData();&lt;br /&gt;
                                        var messageData = parseMessage(rawCharacterData.message,rawCharacterData.count,_maxLength,true);&lt;br /&gt;
                                        adjustedCharacterCount = messageData.adjustedCharacterCount;&lt;br /&gt;
+                                       setCurrentCharCount(rawCharacterData.count);&lt;br /&gt;
                                        if (_maxLength &amp;gt; 0)&lt;br /&gt;
                                                setOverLimit(messageData.isOverLimit);&lt;br /&gt;
                                        setCurrentSegmentCount(messageData.segmentCount);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Acknowledgements ==&lt;br /&gt;
&lt;br /&gt;
* [[User:HattCzech|HattCzech]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
= Force Offline Send Without Dialog =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo mount -o remount,rw /&lt;br /&gt;
sudo vi /usr/palm/applications/com.palm.app.messaging/app/controllers/chatview-assistant.js&lt;br /&gt;
/forceSendIfOffline =&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Change the line to true (below) , writequit , remount, reload , enjoy &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
forceSendIfOffline = true; &lt;br /&gt;
:wq &lt;br /&gt;
sudo mount -o remount,ro /&lt;br /&gt;
sudo stop LunaSysMgr ; sudo start LunaSysMgr&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Jspin72</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Messaging_Mods&amp;diff=2787</id>
		<title>Messaging Mods</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Messaging_Mods&amp;diff=2787"/>
		<updated>2009-07-28T18:54:22Z</updated>

		<summary type="html">&lt;p&gt;Jspin72: added another option for displaying a timestamp in text messages - also included a mod to the format of the message text&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;All files are located in '''/usr/palm/applications/com.palm.app.messaging/'''&lt;br /&gt;
&lt;br /&gt;
= Add Timestamps to All Messages =&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
A number of users have requested adding timestamps to each message that arrives on the device.&lt;br /&gt;
Palm actually goes out of their way to group messages that have arrived during various time intervals,&lt;br /&gt;
but if you'd prefer to see a timestamp on each message, simply follow the instructions below.&lt;br /&gt;
&lt;br /&gt;
== Procedure ==&lt;br /&gt;
&lt;br /&gt;
# [[Portal:Accessing_Linux|Gain root access to your device]]&lt;br /&gt;
# Remount the file system as read/write&lt;br /&gt;
# cd to '''/usr/palm/applications/com.palm.app.messaging/app/controllers/'''&lt;br /&gt;
# Backup '''chatview-assistant.js''' (just to be safe)&lt;br /&gt;
# Open '''chatview-assistant.js''' and comment out the following lines:&lt;br /&gt;
#* 1169 (webOS 1.1: '''1242''') - line that starts with: '''if(!ChatFlags.'''&lt;br /&gt;
#* 1177 (webOS 1.1: '''1250''') - line that starts with: '''if(today-msg.'''&lt;br /&gt;
#* 1179 (webOS 1.1: '''1252''') - first closing bracket on its own line: '''}'''&lt;br /&gt;
#* 1180 (webOS 1.1: '''1253''') - second closing bracket on its own line: '''}'''&lt;br /&gt;
# Save the file and exit the editor&lt;br /&gt;
# Remount the file system as read-only&lt;br /&gt;
# Logout of your root session&lt;br /&gt;
# Reboot the device&lt;br /&gt;
&lt;br /&gt;
You should now see a full timestamp on all received messages.&lt;br /&gt;
&lt;br /&gt;
== Acknowledgements ==&lt;br /&gt;
&lt;br /&gt;
Thanks to [[User:tk102|tk102]] and [[User:scuba_steve|scuba_steve]] on [http://www.precentral.net/  PreCentral] for the mod.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
= Add Timestamps to All Messages - another approach =&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The method described above is the easiest way to display message timestamps.  I went a little farther since I didn't want the &amp;quot;Message Sent:&amp;quot; label and I also wanted to format the string a bit more.  While I was at it, I also modified the view for the message text to display as pre-formatted text since text messages are text after all, not html.&lt;br /&gt;
&lt;br /&gt;
== Procedure ==&lt;br /&gt;
&lt;br /&gt;
* [[Portal:Accessing_Linux|Gain root access to your device]]&lt;br /&gt;
* save a backup of /usr/palm/applications/com.palm.app.messaging/&lt;br /&gt;
** stylesheets/messaging.css&lt;br /&gt;
** app/views/chatview/message/message-text.html&lt;br /&gt;
** app/controllers/chatview-assistant.js&lt;br /&gt;
* edit stylesheets/messaging.css&lt;br /&gt;
** search for the string 'messageText' and append the following after its style definition&lt;br /&gt;
&lt;br /&gt;
 .messageText pre {&lt;br /&gt;
    font-family: inherit;&lt;br /&gt;
    font-size: inherit;&lt;br /&gt;
    color: inherit;&lt;br /&gt;
 }&lt;br /&gt;
 .timeStamp {&lt;br /&gt;
    font-size: 12px;&lt;br /&gt;
    font-style: italic;&lt;br /&gt;
    color: #1111ff;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
**feel free to change the style to your liking.  I tried using 'white-space: pre-wrap' in the .messageText class but it didn't behave as expected, hence the use of the pre tag.&lt;br /&gt;
* edit app/views/chatview/message/message-text.html&lt;br /&gt;
** change the single line to:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&amp;lt;div class=&amp;quot;messageText&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;#{-messageText}&amp;lt;/pre&amp;gt; #{-errorContent}&amp;lt;span class=&amp;quot;timeStamp&amp;quot;&amp;gt;#{-timeStampText}&amp;lt;/span&amp;lt;/div&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* edit app/controllers/chatview-assistant.js&lt;br /&gt;
** search for the string 'preFormatChatList:' and just below that look for 'var msg = stuff.list[i];'&lt;br /&gt;
** somewhere after that line (within the for loop) add the following:&lt;br /&gt;
 var ts = new Date();&lt;br /&gt;
 ts.setTime(msg.deviceTimeStamp);&lt;br /&gt;
 msg.timeStampText = Mojo.Format.formatDate(ts,'short');&lt;br /&gt;
** note that I used msg.deviceTimeStamp which I believe is when the phone sent/received the message.  If you'd prefer the time it was actually sent by the sender, use msg.timeStamp instead.&lt;br /&gt;
* restart LunaSysMgr or reboot&lt;br /&gt;
&lt;br /&gt;
be sure to save the files you modified as they could get overwritten on the next sprint update.  better yet, install [[Portal:Applying_Patches|quilt]] to manage the diffs as a patch.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
= New Card For Each Conversation =&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The message app can be a pain when you have multiple conversations going on. You often have to swipe back and then pick someone else. &lt;br /&gt;
It gets annoying fast. This modification modifies the messaging application so that a new card is created whenever you click into a conversation.&lt;br /&gt;
&lt;br /&gt;
== Procedure ==&lt;br /&gt;
&lt;br /&gt;
Edit '''/usr/palm/applications/com.palm.app.messaging/app/controllers/listview-assistant.js''' and replace the launchChatView function with the following function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
launchChatView: function(chatThreadId) {&lt;br /&gt;
    //Need to jump to that stage if it exists&lt;br /&gt;
    var stageController = Mojo.Controller.appController.getStageController(&amp;quot;messaging&amp;quot;+chatThreadId);&lt;br /&gt;
        if (stageController) {&lt;br /&gt;
            stageController.activate();&lt;br /&gt;
            return;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
    var params = {name: 'messaging' + chatThreadId,&lt;br /&gt;
            lightweight: Mojo.Controller.appInfo.lwStages&lt;br /&gt;
    };&lt;br /&gt;
&lt;br /&gt;
    var callback = function(controller) {&lt;br /&gt;
        controller.pushScene('chatview',chatThreadId,{&lt;br /&gt;
                    focusWindow: true&lt;br /&gt;
                });        &lt;br /&gt;
    };&lt;br /&gt;
&lt;br /&gt;
    Mojo.Controller.getAppController().createStageWithCallback(params, callback); //doesnt create ifit exists sooo&lt;br /&gt;
  },&lt;br /&gt;
&lt;br /&gt;
  clearListBadgeForChatThreadId: function(chatThreadId) {&lt;br /&gt;
    var badgeContainers = [&amp;quot;buddyBageContainer&amp;quot;,&amp;quot;historyBageContainer&amp;quot;];&lt;br /&gt;
    var listItem;&lt;br /&gt;
    for (var i = 0; i &amp;lt; badgeContainers.length; i++) {&lt;br /&gt;
        listItem = this.controller.get(badgeContainers[i] + chatThreadId);&lt;br /&gt;
        if (listItem &amp;amp;&amp;amp; !listItem.hasClassName('hide-unread-count')) {&lt;br /&gt;
            listItem.addClassName('hide-unread-count');&lt;br /&gt;
        }&lt;br /&gt;
    }    &lt;br /&gt;
  },&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now in '''/usr/palm/applications/com.palm.app.messaging/app/controllers/chatview-assistant.js''', comment out lines 246 and 247 (webOS 1.1: comment out lines '''289''' and '''290''').&lt;br /&gt;
This change will ensure that if you use the &amp;quot;back gesture&amp;quot; in a chat, the application doesn't bring you back to the conversation list...or do anything else.&lt;br /&gt;
&lt;br /&gt;
To &amp;quot;comment out&amp;quot; a line, add // at the beginning. Example:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
printf(&amp;quot;This is code&amp;quot;);&lt;br /&gt;
//printf(&amp;quot;This is commented out&amp;quot;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Concerns ==&lt;br /&gt;
There is some delay in creating the new cards. I'm not sure why though.&lt;br /&gt;
As stated above, the cards are only opened when you click into the conversation.  Responding to a notification will result in the reuse of the buddy list window, and you have disabled the back gesture.&lt;br /&gt;
&lt;br /&gt;
== Acknolwedgements ==&lt;br /&gt;
&lt;br /&gt;
Thanks to [[User:mikedg|mikedg]] for the mod.&lt;br /&gt;
&lt;br /&gt;
[[User:chris_phelps|chris_phelps]] is continuing to work on this modification to get it working more completely.&lt;br /&gt;
The first step is to clean up the other launchChatNNN functionality in app-assistant.js which accepts Luna System calls from the notification dashboard items which are created when a new message is received on the phone. These code modifications are being tested currently, and will be posted when we figure out how to clear the new message counters in the main listview-assistant.js.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
= Character Counter =&lt;br /&gt;
&lt;br /&gt;
[[Image:Messaging_CharacterCounter.jpg|border|right|Character Counter]]&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
One of the features I liked about my old Treo was the character counter built-in to the messaging application. I thought it would be useful on the Pre, so I modified the messaging application to show the current character count. I made this a separate page from the other modifications because it requires many code changes. Maybe the other messaging modifications could be rolled into this page as well.&lt;br /&gt;
&lt;br /&gt;
== Procedure ==&lt;br /&gt;
&lt;br /&gt;
Run the following commands:&lt;br /&gt;
&lt;br /&gt;
''In this example, I have the patch file located in my home directory under '''patches'''''&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd /&lt;br /&gt;
sudo patch -p0 --backup-if-mismatch &amp;lt; ~/patches/charcounter.patch&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is what you should see if it ran properly:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
patching file /usr/palm/applications/com.palm.app.messaging/app/controllers/chatview-assistant.js&lt;br /&gt;
patching file /usr/palm/applications/com.palm.app.messaging/app/controllers/compose-assistant.js&lt;br /&gt;
patching file /usr/palm/applications/com.palm.app.messaging/app/utilities/CharacterCounter.js&lt;br /&gt;
patching file /usr/palm/applications/com.palm.app.messaging/app/views/chatview/chatview-scene.html&lt;br /&gt;
patching file /usr/palm/applications/com.palm.app.messaging/app/views/compose/compose-scene.html&lt;br /&gt;
patching file /usr/palm/applications/com.palm.app.messaging/stylesheets/messaging.css&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These modifications will require LunaSysMgr to be restarted. A rescan will not work. After you've run the commands above, run one more command:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
pkill LunaSysMgr&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== charcounter.patch ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;diff&amp;quot;&amp;gt;&lt;br /&gt;
diff -ur /usr/palm/applications/com.palm.app.messaging/app/controllers/chatview-assistant.js /usr/palm/app-modified/com.palm.app.messaging/app/controllers/chatview-assistant.js&lt;br /&gt;
--- /usr/palm/applications/com.palm.app.messaging/app/controllers/chatview-assistant.js	2009-07-18 00:22:14.000000000 -0500&lt;br /&gt;
+++ /usr/palm/app-modified/com.palm.app.messaging/app/controllers/chatview-assistant.js	2009-07-23 23:13:19.000000000 -0500&lt;br /&gt;
@@ -160,6 +160,11 @@&lt;br /&gt;
 				segmentCountContainer: this.controller.get('segmentCounterContainer'),&lt;br /&gt;
 				segmentCountElement: this.controller.get('segmentCounter'),&lt;br /&gt;
 				setTextFieldValueFn: this.setTextFieldValue.bind(this)&lt;br /&gt;
+			},&lt;br /&gt;
+			charCounter: {&lt;br /&gt;
+				charCountContainer: this.controller.get('charCounterContainer'),&lt;br /&gt;
+				charCountElement: this.controller.get('charCounter'),&lt;br /&gt;
+				setTextFieldValueFn: this.setTextFieldValue.bind(this)&lt;br /&gt;
 			}&lt;br /&gt;
 		};&lt;br /&gt;
 &lt;br /&gt;
diff -ur /usr/palm/applications/com.palm.app.messaging/app/controllers/compose-assistant.js /usr/palm/app-modified/com.palm.app.messaging/app/controllers/compose-assistant.js&lt;br /&gt;
--- /usr/palm/applications/com.palm.app.messaging/app/controllers/compose-assistant.js	2009-07-18 00:22:14.000000000 -0500&lt;br /&gt;
+++ /usr/palm/app-modified/com.palm.app.messaging/app/controllers/compose-assistant.js	2009-07-23 23:14:11.000000000 -0500&lt;br /&gt;
@@ -140,6 +140,11 @@&lt;br /&gt;
 			segmentCountContainer: this.controller.get('segmentCounterContainer'),&lt;br /&gt;
 			segmentCountElement: this.controller.get('segmentCounter'),&lt;br /&gt;
 			setTextFieldValueFn: this.setTextFieldValue.bind(this)&lt;br /&gt;
+		},&lt;br /&gt;
+		charCounter: {&lt;br /&gt;
+			charCountContainer: this.controller.get('charCounterContainer'),&lt;br /&gt;
+			charCountElement: this.controller.get('charCounter'),&lt;br /&gt;
+			setTextFieldValueFn: this.setTextFieldValue.bind(this)&lt;br /&gt;
 		}&lt;br /&gt;
 	};&lt;br /&gt;
 &lt;br /&gt;
diff -ur /usr/palm/applications/com.palm.app.messaging/app/utilities/CharacterCounter.js /usr/palm/app-modified/com.palm.app.messaging/app/utilities/CharacterCounter.js&lt;br /&gt;
--- /usr/palm/applications/com.palm.app.messaging/app/utilities/CharacterCounter.js	2009-07-18 00:22:14.000000000 -0500&lt;br /&gt;
+++ /usr/palm/app-modified/com.palm.app.messaging/app/utilities/CharacterCounter.js	2009-07-23 23:47:32.000000000 -0500&lt;br /&gt;
@@ -39,6 +39,10 @@&lt;br /&gt;
 				containerElement: null,&lt;br /&gt;
 				valueElement: null&lt;br /&gt;
 			};&lt;br /&gt;
+			var charCounterUI = {&lt;br /&gt;
+				containerElement: null,&lt;br /&gt;
+				valueElement: null&lt;br /&gt;
+			};&lt;br /&gt;
 			&lt;br /&gt;
 						&lt;br /&gt;
 			// TODO: eventually we might want to implement some cleverness that counts&lt;br /&gt;
@@ -185,6 +189,20 @@&lt;br /&gt;
 				}&lt;br /&gt;
 			};&lt;br /&gt;
 			&lt;br /&gt;
+			var setCurrentCharCount = function(newCharCount) {&lt;br /&gt;
+				if(charCounterUI.valueElement)&lt;br /&gt;
+					charCounterUI.valueElement.update(newCharCount);&lt;br /&gt;
+				if(charCounterUI.containerElement) {&lt;br /&gt;
+					if (newCharCount == 0) {&lt;br /&gt;
+						if (charCounterUI.containerElement.visible())&lt;br /&gt;
+							charCounterUI.containerElement.hide();&lt;br /&gt;
+					} else {&lt;br /&gt;
+						if (!charCounterUI.containerElement.visible())&lt;br /&gt;
+							charCounterUI.containerElement.show();&lt;br /&gt;
+					}&lt;br /&gt;
+				}&lt;br /&gt;
+			};&lt;br /&gt;
+			&lt;br /&gt;
 			return {&lt;br /&gt;
 				&lt;br /&gt;
 				init: function(controller,platform,textElement,params) {&lt;br /&gt;
@@ -265,7 +283,13 @@&lt;br /&gt;
 								setTextFieldValueFn = params.segmentCounter.setTextFieldValueFn;&lt;br /&gt;
 							}						&lt;br /&gt;
 						}&lt;br /&gt;
-&lt;br /&gt;
+						if(params.charCounter) {&lt;br /&gt;
+							charCounterUI.containerElement = params.charCounter.charCountContainer;&lt;br /&gt;
+							charCounterUI.valueElement = params.charCounter.charCountElement;&lt;br /&gt;
+							if(params.charCounter.setTextFieldValueFn) {&lt;br /&gt;
+								setTextFieldValueFn = params.charCounter.setTextFieldValueFn;&lt;br /&gt;
+							}						&lt;br /&gt;
+						}&lt;br /&gt;
 					}					&lt;br /&gt;
 				},&lt;br /&gt;
 				&lt;br /&gt;
@@ -304,6 +328,7 @@&lt;br /&gt;
 					var rawCharacterData = getRawCharacterData();&lt;br /&gt;
 					var messageData = parseMessage(rawCharacterData.message,rawCharacterData.count,_maxLength,true);&lt;br /&gt;
 					adjustedCharacterCount = messageData.adjustedCharacterCount;&lt;br /&gt;
+					setCurrentCharCount(rawCharacterData.count);&lt;br /&gt;
 					if (_maxLength &amp;gt; 0)&lt;br /&gt;
 						setOverLimit(messageData.isOverLimit);&lt;br /&gt;
 					setCurrentSegmentCount(messageData.segmentCount);				&lt;br /&gt;
diff -ur /usr/palm/applications/com.palm.app.messaging/app/views/chatview/chatview-scene.html /usr/palm/app-modified/com.palm.app.messaging/app/views/chatview/chatview-scene.html&lt;br /&gt;
--- /usr/palm/applications/com.palm.app.messaging/app/views/chatview/chatview-scene.html	2009-07-18 00:22:14.000000000 -0500&lt;br /&gt;
+++ /usr/palm/app-modified/com.palm.app.messaging/app/views/chatview/chatview-scene.html	2009-07-23 23:16:55.000000000 -0500&lt;br /&gt;
@@ -22,6 +22,10 @@&lt;br /&gt;
 			&amp;lt;div id=&amp;quot;messageContainer&amp;quot; class='palm-row'&amp;gt;&lt;br /&gt;
 				&amp;lt;div class=&amp;quot;palm-row-wrapper textfield-group focused&amp;quot;&amp;gt;&lt;br /&gt;
 					&amp;lt;div class=&amp;quot;title&amp;quot;&amp;gt;&lt;br /&gt;
+						&amp;lt;div id=&amp;quot;charCounterContainer&amp;quot;&amp;gt;&lt;br /&gt;
+							&amp;lt;div id=&amp;quot;charCounter&amp;quot;&amp;gt;&lt;br /&gt;
+							&amp;lt;/div&amp;gt;&lt;br /&gt;
+						&amp;lt;/div&amp;gt;&lt;br /&gt;
 						&amp;lt;div id=&amp;quot;attachmentContainer&amp;quot; style=&amp;quot;display: none;&amp;quot;&amp;gt;&lt;br /&gt;
 							&amp;lt;div id=&amp;quot;cancelAttachment&amp;quot;&amp;gt;&lt;br /&gt;
 							&amp;lt;/div&amp;gt;&lt;br /&gt;
diff -ur /usr/palm/applications/com.palm.app.messaging/app/views/compose/compose-scene.html /usr/palm/app-modified/com.palm.app.messaging/app/views/compose/compose-scene.html&lt;br /&gt;
--- /usr/palm/applications/com.palm.app.messaging/app/views/compose/compose-scene.html	2009-07-18 00:22:14.000000000 -0500&lt;br /&gt;
+++ /usr/palm/app-modified/com.palm.app.messaging/app/views/compose/compose-scene.html	2009-07-23 23:17:14.000000000 -0500&lt;br /&gt;
@@ -6,6 +6,10 @@&lt;br /&gt;
 		&amp;lt;div id=&amp;quot;messageContainer&amp;quot; class='palm-row'&amp;gt;&lt;br /&gt;
 			&amp;lt;div class=&amp;quot;palm-row-wrapper textfield-group focused&amp;quot;&amp;gt;&lt;br /&gt;
 				&amp;lt;div class=&amp;quot;title&amp;quot;&amp;gt;&lt;br /&gt;
+					&amp;lt;div id=&amp;quot;charCounterContainer&amp;quot;&amp;gt;&lt;br /&gt;
+						&amp;lt;div id=&amp;quot;charCounter&amp;quot;&amp;gt;&lt;br /&gt;
+						&amp;lt;/div&amp;gt;&lt;br /&gt;
+					&amp;lt;/div&amp;gt;&lt;br /&gt;
 					&amp;lt;div id=&amp;quot;attachmentContainer&amp;quot; style=&amp;quot;display: none;&amp;quot;&amp;gt;&lt;br /&gt;
 						&amp;lt;div id=&amp;quot;cancelAttachment&amp;quot;&amp;gt;&lt;br /&gt;
 						&amp;lt;/div&amp;gt;&lt;br /&gt;
diff -ur /usr/palm/applications/com.palm.app.messaging/stylesheets/messaging.css /usr/palm/app-modified/com.palm.app.messaging/stylesheets/messaging.css&lt;br /&gt;
--- /usr/palm/applications/com.palm.app.messaging/stylesheets/messaging.css	2009-07-18 00:22:22.000000000 -0500&lt;br /&gt;
+++ /usr/palm/app-modified/com.palm.app.messaging/stylesheets/messaging.css	2009-07-23 23:19:25.000000000 -0500&lt;br /&gt;
@@ -837,6 +837,23 @@&lt;br /&gt;
 #messageContainer.palm-row .icon.right {&lt;br /&gt;
 	height: 61px;&lt;br /&gt;
 }&lt;br /&gt;
+#messageContainer #charCounterContainer {&lt;br /&gt;
+	line-height: 20px;&lt;br /&gt;
+	display:block;&lt;br /&gt;
+	height: 20px;&lt;br /&gt;
+	border-width: 0px 10px 0px 9px;&lt;br /&gt;
+	-webkit-border-image: url(../images/message-segment-badge.png) 0 10 0 9 stretch stretch;&lt;br /&gt;
+	position: absolute;&lt;br /&gt;
+	z-index: 3;&lt;br /&gt;
+	top: 2px;&lt;br /&gt;
+	left: 2px;&lt;br /&gt;
+}&lt;br /&gt;
+#messageContainer #charCounterContainer #charCounter {&lt;br /&gt;
+	font-size: 12px;&lt;br /&gt;
+	font-weight: bold;&lt;br /&gt;
+	color: #679BC2;&lt;br /&gt;
+	margin: 0px -4px 3px -3px;&lt;br /&gt;
+}&lt;br /&gt;
 #messageContainer #attachmentContainer {&lt;br /&gt;
 	position: relative;&lt;br /&gt;
 	margin-top:10px;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Post os1.1 update, you will need to swap in the following for the utilities/CharacterCounter.js section: (mod confirmed working by tcurtin, 7/24/09)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;diff&amp;quot;&amp;gt;&lt;br /&gt;
diff -ur /usr/palm/applications/com.palm.app.messaging/app/utilities/CharacterCounter.js /usr/palm/app-modified/com.palm.app.messaging/app/utilities/CharacterCounter.js&lt;br /&gt;
--- /usr/palm/applications/com.palm.app.messaging/app/utilities/CharacterCounter.js	2009-07-18 00:22:14.000000000 -0500&lt;br /&gt;
+++ /usr/palm/app-modified/com.palm.app.messaging/app/utilities/CharacterCounter.js	2009-07-24 12:20:12.000000000 -0500&lt;br /&gt;
@@ -39,6 +39,11 @@&lt;br /&gt;
                                containerElement: null,&lt;br /&gt;
                                valueElement: null&lt;br /&gt;
                        };&lt;br /&gt;
+                       var charCounterUI = {&lt;br /&gt;
+                               containerElement: null,&lt;br /&gt;
+                               valueElement: null&lt;br /&gt;
+                       };&lt;br /&gt;
+&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                        // TODO: eventually we might want to implement some cleverness that counts&lt;br /&gt;
@@ -51,6 +56,10 @@&lt;br /&gt;
                                var message = textAreaElement.value;&lt;br /&gt;
                                return {count:message.length, message:message};&lt;br /&gt;
                        };&lt;br /&gt;
+                       var charCounterUI = {&lt;br /&gt;
+                               containerElement: null,&lt;br /&gt;
+                               valueElement: null&lt;br /&gt;
+                       };&lt;br /&gt;
&lt;br /&gt;
                        var setOverLimit = function(isOver) {&lt;br /&gt;
                                if (isOver) {&lt;br /&gt;
@@ -185,6 +194,21 @@&lt;br /&gt;
                                }&lt;br /&gt;
                        };&lt;br /&gt;
&lt;br /&gt;
+                       var setCurrentCharCount = function(newCharCount) {&lt;br /&gt;
+                               if(charCounterUI.valueElement)&lt;br /&gt;
+                                       charCounterUI.valueElement.update(newCharCount);&lt;br /&gt;
+                               if(charCounterUI.containerElement) {&lt;br /&gt;
+                                       if (newCharCount == 0) {&lt;br /&gt;
+                                               if (charCounterUI.containerElement.visible())&lt;br /&gt;
+                                                       charCounterUI.containerElement.hide();&lt;br /&gt;
+                                       } else {&lt;br /&gt;
+                                               if (!charCounterUI.containerElement.visible())&lt;br /&gt;
+                                                       charCounterUI.containerElement.show();&lt;br /&gt;
+                                       }&lt;br /&gt;
+                               }&lt;br /&gt;
+                       };&lt;br /&gt;
+&lt;br /&gt;
+&lt;br /&gt;
                        return {&lt;br /&gt;
&lt;br /&gt;
                                init: function(controller,platform,textElement,params) {&lt;br /&gt;
@@ -265,7 +289,13 @@&lt;br /&gt;
                                                                setTextFieldValueFn = params.segmentCounter.setTextFieldValueFn;&lt;br /&gt;
                                                        }&lt;br /&gt;
                                                }&lt;br /&gt;
-&lt;br /&gt;
+                                               if(params.charCounter) {&lt;br /&gt;
+                                                       charCounterUI.containerElement = params.charCounter.charCountContainer;&lt;br /&gt;
+                                                       charCounterUI.valueElement = params.charCounter.charCountElement;&lt;br /&gt;
+                                                       if(params.charCounter.setTextFieldValueFn) {&lt;br /&gt;
+                                                               setTextFieldValueFn = params.charCounter.setTextFieldValueFn;&lt;br /&gt;
+                                                       }&lt;br /&gt;
+                                               }&lt;br /&gt;
                                        }&lt;br /&gt;
                                },&lt;br /&gt;
&lt;br /&gt;
@@ -304,6 +334,7 @@&lt;br /&gt;
                                        var rawCharacterData = getRawCharacterData();&lt;br /&gt;
                                        var messageData = parseMessage(rawCharacterData.message,rawCharacterData.count,_maxLength,true);&lt;br /&gt;
                                        adjustedCharacterCount = messageData.adjustedCharacterCount;&lt;br /&gt;
+                                       setCurrentCharCount(rawCharacterData.count);&lt;br /&gt;
                                        if (_maxLength &amp;gt; 0)&lt;br /&gt;
                                                setOverLimit(messageData.isOverLimit);&lt;br /&gt;
                                        setCurrentSegmentCount(messageData.segmentCount);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Acknowledgements ==&lt;br /&gt;
&lt;br /&gt;
* [[User:HattCzech|HattCzech]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
= Force Offline Send Without Dialog =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo mount -o remount,rw /&lt;br /&gt;
sudo vi /usr/palm/applications/com.palm.app.messaging/app/controllers/chatview-assistant.js&lt;br /&gt;
/forceSendIfOffline =&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Change the line to true (below) , writequit , remount, reload , enjoy &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
forceSendIfOffline = true; &lt;br /&gt;
:wq &lt;br /&gt;
sudo mount -o remount,ro /&lt;br /&gt;
sudo stop LunaSysMgr ; sudo start LunaSysMgr&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Jspin72</name></author>
	</entry>
</feed>