(js) Draft: update subject in list/detail views
Update the subject everywhere when saving a draft.pull/239/head
parent
b39d3db674
commit
4133a0b954
|
@ -124,7 +124,7 @@
|
|||
</md-card-actions>
|
||||
<md-card-content>
|
||||
<div class="sg-padded">
|
||||
<h5 ng-bind="::viewer.message.subject"><!-- subject --></h5>
|
||||
<h5 ng-bind="viewer.message.subject"><!-- subject --></h5>
|
||||
<time class="msg-date" datetime="viewer.message.date" ng-bind="::viewer.message.date"><!-- date --></time>
|
||||
</div>
|
||||
<div>
|
||||
|
|
|
@ -28,12 +28,17 @@
|
|||
|
||||
|
||||
this.$onInit = function () {
|
||||
var watchedAttrs = ['uid', 'isread', 'isflagged', 'flags', 'subject'];
|
||||
|
||||
// this.service = Message;
|
||||
this.MailboxService = Mailbox;
|
||||
|
||||
if (Mailbox.selectedFolder.type == 'draft')
|
||||
watchedAttrs.push('subject');
|
||||
|
||||
$scope.$watch(
|
||||
function() {
|
||||
return $ctrl.message? [ _.pick($ctrl.message, ['uid', 'isread', 'isflagged', 'flags']) ] : null;
|
||||
return $ctrl.message? [ _.pick($ctrl.message, watchedAttrs) ] : null;
|
||||
},
|
||||
function(newId, oldId) {
|
||||
if ($ctrl.message) {
|
||||
|
|
Loading…
Reference in New Issue