diff --git a/src/js/controller/mail-list.js b/src/js/controller/mail-list.js
index 70dd366..b5623de 100644
--- a/src/js/controller/mail-list.js
+++ b/src/js/controller/mail-list.js
@@ -62,11 +62,6 @@ define(function(require) {
$scope.state.mailList.selected = email;
- // split text only emails into parts for easier rendering
- if (!email.html && typeof email.body === 'string') {
- email.bodyDisplayLines = email.body.split('\n');
- }
-
// mark selected message as 'read'
markAsRead(email);
};
diff --git a/src/js/controller/read.js b/src/js/controller/read.js
index c2bf5d4..63715d4 100644
--- a/src/js/controller/read.js
+++ b/src/js/controller/read.js
@@ -14,6 +14,10 @@ define(function(require) {
this.open = to;
}
};
+
+ $scope.lineEmpty = function(line) {
+ return line.replace(/>/g, '').trim().length === 0;
+ };
};
//
diff --git a/src/js/controller/write.js b/src/js/controller/write.js
index 46a8315..ca5a5cd 100644
--- a/src/js/controller/write.js
+++ b/src/js/controller/write.js
@@ -62,12 +62,12 @@ define(function(require) {
// fill text body
from = re.from[0].name || re.from[0].address;
- body = '
' + $filter('date')(re.sentDate, 'EEEE, MMM d, yyyy h:mm a') + ' ' + from + ' wrote:
';
+ body = '
' + $filter('date')(re.sentDate, 'EEEE, MMM d, yyyy h:mm a') + ' ' + from + ' wrote:
> ';
// clean text from markup if to prevent injection in contenteditable
if (!re.html) {
cleaned = angular.element('
' + re.body + '
').text(); - body += cleaned.split('\n').join('