| |   |
| This patch adds clean timestamps to all messages and gets rid of the divider bar unless transport is changed. |
| Index: /usr/palm/applications/com.palm.app.messaging/app/controllers/chatview-assistant.js |
| =================================================================== |
| --- .orig/usr/palm/applications/com.palm.app.messaging/app/controllers/chatview-assistant.js |
| +++ /usr/palm/applications/com.palm.app.messaging/app/controllers/chatview-assistant.js |
| @@ -1293,17 +1293,23 @@ var ChatviewAssistant = Class.create({ |
| d.setTime(msg.deviceTimeStamp); |
| msg.niceDate = BucketDateFormatter.getDateBucket(d,true,true); // this used to use msg.timeStamp - changed 2008-11-05 |
| |
| + // timestamp hack - enables timestamps on all messages (clean-messenger); |
| + var ts = new Date(); |
| + ts.setTime(msg.deviceTimeStamp); |
| + msg.timeStampText = Mojo.Format.formatDate(ts,'short'); |
| + |
| // divider hack - round to the nearest 5 minutes |
| // we have to do this because the list divider implementation does not allow a divider |
| // to have knowledge about other dividers |
| var deviceTimeStampMinutes = d.getMinutes(); |
| d.setMinutes((deviceTimeStampMinutes - (deviceTimeStampMinutes % 5))); |
| d.setSeconds(0); |
| - msg.dividerText = msg.transportClass + BucketDateFormatter.getDateBucket(d,true,true); |
| + msg.dividerText = msg.transportClass; // + BucketDateFormatter.getDateBucket(d,true,true); |
| + // comment in previous line kills ~5min timed divider (clean-messenger); |
| |
| // if the INCOMING message was sent longer than 10 minutes before it arrived on device, |
| // add sent date to indicate that this delay happened |
| - if(!ChatFlags.isOutgoing(msg.flags) && msg.deviceTimeStamp && msg.timeStamp && (msg.deviceTimeStamp-msg.timeStamp) > (1000*60*10)) { |
| + // (clean-messenger); if(!ChatFlags.isOutgoing(msg.flags) && msg.deviceTimeStamp && msg.timeStamp && (msg.deviceTimeStamp-msg.timeStamp) > (1000*60*10)) { |
| var d = new Date(); |
| var today = d.getTime(); |
| d.setTime(msg.timeStamp); |
| @@ -1311,10 +1317,10 @@ var ChatviewAssistant = Class.create({ |
| |
| // Only show the message sent time if it is less than two days old |
| // from when it arrived on device |
| - if(today-msg.timeStamp <= (1000*60*60*24*2)) { |
| - msg.timeStampDeltaMsg = new Template($L("Message Sent: #{dateTime}")).evaluate({dateTime:Mojo.Format.formatDate(sentTimeStamp,'short')}); |
| - } |
| - } |
| + // (clean-messenger); if(today-msg.timeStamp <= (1000*60*60*24*2)) { |
| + msg.timeStampDeltaMsg = new Template($L("#{dateTime}")).evaluate({dateTime:Mojo.Format.formatDate(sentTimeStamp,'short')}); |
| + // (clean-messenger); } |
| + // (clean-messenger); } |
| |
| if (msg.callbackNumber) { |
| msg.callbackNumber = PalmSystem.runTextIndexer(msg.callbackNumber); |
| Index: /usr/palm/applications/com.palm.app.messaging/stylesheets/messaging.css |
| =================================================================== |
| --- .orig/usr/palm/applications/com.palm.app.messaging/stylesheets/messaging.css |
| +++ /usr/palm/applications/com.palm.app.messaging/stylesheets/messaging.css |
| @@ -681,6 +681,7 @@ img.avatar-overlay { |
| width: 40px; |
| height: 40px; |
| } |
| +/* timestamp formatting (clean-messenger)*/ |
| |
| .message.status-success { |
| color: #000000; |